×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Nov 2008
    Posts
    54

    A blank space auto transfered to 20%.. How???

    Hello everyone:

    I am doing a widge project,that need to send a message to a server side,which is developmed by my self.

    Interestingly, when I send a message like that " How are you?" by javascript through GET request.
    such as

    GET http:/127.0.0.1:80/sendmessage.xml?message=how are you

    This message is sent by "how%20are%20you" but this message should be saved in my server database. it didn't transfered back to "how are you" but still "how%20are%20you". How??? How can I make it works????

    I don't want to change my server side. How can escape this auto-transfer in javascript??? Please help me

  2. #2
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: A blank space auto transfered to 20%.. How???

    As per RFC 3986 URL's must be encoded in escaped notation to fix issues between different servers and/or clients so I doubt you can override the functionality from the javascript side.

    You can do it from c++ however
    Download Symbian OS now! [url]http://developer.symbian.org[/url]

  3. #3
    Regular Contributor
    Join Date
    Nov 2008
    Posts
    54

    Re: A blank space auto transfered to 20%.. How???

    GIVE ME MORE DETAIL?

  4. #4
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: A blank space auto transfered to 20%.. How???

    You can read the RFC at http://www.ietf.org/rfc/rfc3986.txt and find all the details you need. Oy you can simply open your PC's browser and make a request to any web server, such as http:/127.0.0.1:80/sendmessage.xml?message=how are you and you will see that the request goes out in the same format, http:/127.0.0.1:80/sendmessage.xml?message=how%20are%20you

    It will de up to you to take the text on server side and to perform the URL decode operation on it. See http://www.albionresearch.com/misc/urlencode.php , it has a link to a more useful RFC as well.
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  5. #5
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: A blank space auto transfered to 20%.. How???

    Please see RFC 1855 (http://tools.ietf.org/html/rfc1855)

    You also need to consider that your application is not going to be connected directly to the server but goes through many gateways and routers, all of which are expecting the url to be formatted correctly. As I said the RFC's above and Lucians link cover the rules pretty well

    (And in case you think this escpaing is a waste of time, I spent a week tracking down a bug where periodially the url was being corrupted when connecting to the NOC of a large US telco and it was because the original developer did not bother to escape urls correctly on the client
    Download Symbian OS now! [url]http://developer.symbian.org[/url]

Similar Threads

  1. A blank space auto transfered to 20%.. How???
    By alicenan88 in forum Symbian
    Replies: 1
    Last Post: 2009-11-29, 19:19
  2. Low Disk Space Detection.
    By shashishaw in forum Symbian
    Replies: 5
    Last Post: 2009-09-18, 09:29

Posting Permissions

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