1

As HTTP requests and responses travel across the internet, what is the format of the text in the request? Is it ASCII?

Example: If an HTTP request looks like the following -

GET /mysite/ HTTP/1.1
 -- rest of the request --

Does the request go out as the following stream of ASCII coded bits? -

(In decimal) 71 69 84 32 47 etc.
Which is - "G" "E" "T" "space" "/" etc.

Or is it in some other format?

Any additional information about this process would also be greatly appreciated. Thanks!

A Bogus
  • 3,852
  • 11
  • 39
  • 58
  • Grab a sniffer (such as wireshark) and watch the requests/responses. Also see http://stackoverflow.com/questions/818122/which-encoding-is-used-by-the-http-protocol – Doon Aug 03 '15 at 00:54
  • Thanks for the link Doon. – A Bogus Aug 03 '15 at 00:57

1 Answers1

0

According to the specification, URLs can only be sent across the internet in ASCII format. This presents the problem about how to send content not directly contained by the ASCII character set. One common way to deal with this is to base 64 encode all content before sending it via HTTP. This means encoding all content using ASCII characters.

To address your question, if you sniff your GET requests, you will see only ASCII characters. However, the content may or may not be intelligible to the naked eye depending on whether or not it has been either encoded or encrypted (the latter in the case you are using HTTPS).

Tim Biegeleisen
  • 502,043
  • 27
  • 286
  • 360