Joe
Joe

Reputation: 7919

Where are URI attributes stored in a GET request HEAD or BODY?

A GET request does not contain any HTTP body data but, in case that it supplies some supplementary data attributes, in form of a query string, where are they stored in the GET request in Header or Body? Are they stored as well in the header?

Example

[email protected]&comments=good%20site

Upvotes: 0

Views: 1336

Answers (2)

Gung Foo
Gung Foo

Reputation: 13558

URI attributes are send WITH the GET request. If you request a page from a server the browser is sending a request to the webserver which looks like this:

<open the connection to www.server.com>
GET /form HTTP/1.1
<server sends document>

If you make a GET request containing data the string you already pointed out would simply be added to the URI

<open the connection to www.server.com>
GET /[email protected]@comments=good%20site HTTP/1.1
<server sends document>

The downside of this is that with the default webserver logging turned on, all data the client sends would be written to the server logs since it is part of the REQUEST URI!

For a reference, look here: Hypertext Transfer Protocol -- HTTP/1.1

Upvotes: 2

David Gutierrez
David Gutierrez

Reputation: 383

The attributes you refer to are really called a query string (everything after the '?' is considered the query string), and the query string is simply part of the URL as a whole and therefore is part of the header. They are not placed into the body.

Upvotes: 0

Related Questions