From: Eric Bednarz on
"Evertjan." <exjxw.hannivoort(a)interxnl.net> writes:

> Scott Sauyet wrote on 25 jan 2010 in comp.lang.javascript:
>
>> "Evertjan." <exjxw.hannivo...(a)interxnl.net> wrote:

>>> The new page can never know if the page request is
>>> 1 a result of a bona fide form-get
>>> or
>>> 2 just from a link contaning an URL with querystring.
>>
>> I'm not sure that is a meaningful distinction. At the HTTP level,
>> both are GET requests, so even the server doesn't distinguish this.
>
> No, they could also be POST requests at ther same time.

I would like an example of an HTTP request that simultaneously uses the
HTTP GET and POST methods.
From: Erwin Moller on
Eric Bednarz schreef:
> "Evertjan." <exjxw.hannivoort(a)interxnl.net> writes:
>
>> Scott Sauyet wrote on 25 jan 2010 in comp.lang.javascript:
>>
>>> "Evertjan." <exjxw.hannivo...(a)interxnl.net> wrote:
>
>>>> The new page can never know if the page request is
>>>> 1 a result of a bona fide form-get
>>>> or
>>>> 2 just from a link contaning an URL with querystring.
>>> I'm not sure that is a meaningful distinction. At the HTTP level,
>>> both are GET requests, so even the server doesn't distinguish this.
>> No, they could also be POST requests at ther same time.
>
> I would like an example of an HTTP request that simultaneously uses the
> HTTP GET and POST methods.

Here is one:

<form action="whatever.php?id=12" Method="POST" name="testform">
Firstname: <input type="text" name="firstname">
<input type="submit">
</form>

Then from PHP (whatever.php):
-------------------------------
<pre>
GET contains:
<?php
print_r($_GET);
?>
POST contains:
<?php
print_r($_POST);
?>
</pre>
-------------------------------

It is a bit weird I admit, but it works just fine.


Regards,
Erwin Moller

--
"There are two ways of constructing a software design: One way is to
make it so simple that there are obviously no deficiencies, and the
other way is to make it so complicated that there are no obvious
deficiencies. The first method is far more difficult."
-- C.A.R. Hoare
From: Scott Sauyet on
On Jan 26, 5:55 am, Erwin Moller
<Since_humans_read_this_I_am_spammed_too_m...(a)spamyourself.com> wrote:
> Eric Bednarz schreef:
>> I would like an example of an HTTP request that simultaneously uses the
>> HTTP GET and POST methods.
>
> Here is one:
>
> <form action="whatever.php?id=12" Method="POST" name="testform">
> Firstname: <input type="text" name="firstname">
> <input type="submit">
> </form>
> [ ... ]
> It is a bit weird I admit, but it works just fine.

Well, this still is an HTTP POST request. PHP interprets the query
string of the URL as GET variables, but it is not a GET request.

-- Scott
From: Evertjan. on
Eric Bednarz wrote on 26 jan 2010 in comp.lang.javascript:

>>> See, there is a way :)
>>
>> No there is not.

Here you skip the explanation of the above "no ..."

> I read that

my sentence?

> as wanting to know the request method, and I would think
> that a HTTP server cannot resolve a resource and send response headers
> without knowing that.

What HTTP-server [is there such an animal?]?

What Resource?

Why should a server without serverside programming ability [if that is what
you mean by HTTP-server], do anything with the POST content of the request
header?

> and send response headers without knowing that.

The request querystring has no special request or response headers.

The POST content is in the request header, not in the response header.

I think!!!

> I wonder what you read.

Where? In the Header?



--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
From: Evertjan. on
Scott Sauyet wrote on 26 jan 2010 in comp.lang.javascript:

> On Jan 26, 5:55�am, Erwin Moller
> <Since_humans_read_this_I_am_spammed_too_m...(a)spamyourself.com> wrote:
>> Eric Bednarz schreef:
>>> I would like an example of an HTTP request that simultaneously uses the
>>> HTTP GET and POST methods.
>>
>> Here is one:
>>
>> <form action="whatever.php?id=12" Method="POST" name="testform">
>> Firstname: <input type="text" name="firstname">
>> <input type="submit">
>> </form>
>> [ ... ]
>> It is a bit weird I admit, but it works just fine.
>
> Well, this still is an HTTP POST request. PHP interprets the query
> string of the URL as GET variables, but it is not a GET request.

So we should define a GET request in the OQ sense just as a any request
that is not a HTTP POST request [disregarding the HEAD request which has no
clientside coding ability]?

You could do that, but what would be the use for the OP?

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6
Prev: triplet question.
Next: extend prototype chain?