×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Apr 2009
    Posts
    16

    Getting java.io.IOException: Error in Http operation

    Hi All,

    I am trying to make HTTPConnection for uploading image data from device to server. my application is working fine. Only the hindering part is, If image file name have special character '&', then I am getting java.io.IOException: Error in Http operation. I am replacing special character '&' by _^_ but it is not working.

    Please Reply.

    Thanks a lot in advance.

  2. #2
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: Getting java.io.IOException: Error in Http operation

    that might be because if you are using GET for example the & char is a reserved char which separates parameters...
    most of the time things like images are first encoded with Base64 before being send and afterwards they get decoded server-side....

  3. #3
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: Getting java.io.IOException: Error in Http operation

    Is the "&" character appearing in the URI? "^" is also not allowed in URIs. Replace "&" with "%26".

    Note that the host operating system at the other end might also not allow certain characters in file names.

    Graham.

  4. #4
    Registered User
    Join Date
    Apr 2009
    Posts
    16

    Re: Getting java.io.IOException: Error in Http operation

    Thanks Friends,

    Now problem has been resolved. Because '&' used as a seperator in URL, so I replaced it by _^_. Problem was occurred by '^' character. So i replaced it by %5e, Now it is working fine.

Similar Threads

  1. java.io.IOException: Error in HTTP operation
    By varma_111 in forum Mobile Java Networking & Messaging & Security
    Replies: 19
    Last Post: 2011-10-16, 09:27
  2. cancel http operation
    By badzio in forum Symbian Networking & Messaging (Closed)
    Replies: 9
    Last Post: 2009-05-21, 22:52
  3. Error in HTTP operation
    By fethy in forum Mobile Java General
    Replies: 10
    Last Post: 2007-08-30, 11:53
  4. http connection throws java.io.IOException: Status=-20
    By adiwin in forum Mobile Java General
    Replies: 3
    Last Post: 2003-03-17, 11:21

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •