httpcharacter-encodingurl-encodinghttp-protocols

How to properly decode HTTP traffic


I'm looking at HTTP traffic, and seeing a POST request that is "application/x-www-form-urlencoded" with strange characters in it:

t=%d8%94%b2%bc+%cb%ae%c9%ab

Various URL decodes that I tried running on this complain that it's not UTF-8 encoded.
I know that in theory a web request can be encoded in any given encoding scheme, but if so, how can I tell which scheme is being used (in order for me to decode it properly)?

I see no hint in the request itself.

This is not a language-specific question (more of a question about the HTTP protocol, I think.)

Any help will be appreciated!


Solution

  • Your question actually contains the answer (form-urlencoded). The request is URL encoded. See this link for more information.

    The strange characters decode to non-ASCII characters except for the '+'. There are decoders on the Web where you can cut and paste your text to see what it really is.