Arc Forumnew | comments | leaders | submitlogin
4 points by lojic 6146 days ago | link | parent

Aren't POST & GET mutually exclusive?


8 points by aston 6146 days ago | link

Technically no. I read up on the spec a while back. GET parameters are probably better referred to as URL args, and they're always retrievable via the URL in the first line of the HTTP request. In the case of a POST, the content of the request may (also) have arguments.

It's not super common to use both, but it's definitely not disallowed by the spec.

-----

1 point by lojic 6146 days ago | link

I'd be interested in seeing any references about this. From what I've read, it seems the intent is to not combine them, but I haven't seen anything explicitly forbidding it. Do you have a source that indicates combining URL parameters in a POST is encouraged, or at least permitted?

http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13....

-----

4 points by aston 6146 days ago | link

I never claimed "encouraged." I just said nothing disallows it. Browsers all seem cool with it, so why shouldn't your web server be?

-----

1 point by lojic 6146 days ago | link

Well the OP stated:

"I noticed that in the case of POST handle-request-thread (srv.arc) throws away the GET args."

Which seems to be criticizing what I would consider perfectly valid behavior. I'm not sure why you would want to split your parameters for a POST between the POST parameters and pieces of the URL.

If a change to the source is being suggested, it seems reasonable to determine if it's warranted by the protocol.

-----

5 points by immad 6146 days ago | link

I haven't checked the specs, but in most web languages I have worked with you can get GET parameters even when there is a POST. If this is not allowed by specs than I stand corrected. GET parameters are just stuck to the url so its definitely possible.. If its not allowed in theory then I stand corrected, I just often find it useful.

-----