[squid-users] Handling PUT-requests with "Expect: 100-continue" header

From: Jan Sievers <sievers_at_zedat.fu-berlin.de>
Date: Wed, 28 Sep 2011 16:15:33 +0200

Hi,

I was recently updating squid from version v3.0.STABLE23 to 3.1.15
and noticed, that the handling of PUT-requests with "Expect:
100-continue" header changed.

While with version v3.0.STABLE23 the proxy wrote to the log file

1316481430.883 2303 192.168.0.1 TCP_MISS/200 314 PUT
http://www.example.com/services/submit.php? - DIRECT/192.0.2.1 text/html

what triggered the client to send a request shortly after:

1316481432.180 1294 192.168.0.1 TCP_MISS/200 314 PUT
http://www.example.com/services/submit.php? - DIRECT/192.0.2.1 text/html

Which look to me that the proxy has forwarded at least something to the
origin server. I don't know if it really reported a 200 to the client
which sounds strange for a PUT-request having a "Expect: 100-continue".
Probably the client (using libcurl 7.16.1) just reached a timeout and
issued another PUT-request without the Expect-header and with a body.

Using version 3.1.15 the proxy wrote to the log file

1317091304.706 0 192.168.0.1 NONE/417 6181 PUT
http://www.example.com/services/submit.php? - NONE/- text/html

No other request comes hereafter. The client user reports the
application says "Error 417".

It seems the client does not repeat the POST-request without "expectations".

On the other hand squid seems not to ask the origin server which is
HTTP/1.1 aware and sends a 417 on it own, which at least for a HTTP/1.1
proxy would be wrong.

Or am I missing something?
Can I do something about it?
Is setting "ignore_expect_100 on" the right thing and without side-effects?

Thanks,
Jan

-- 
Jan Sievers                              |
Freie Universität Berlin                 | sievers_at_zedat.fu-berlin.de
Zentraleinrichtung für Datenverarbeitung | http://www.zedat.fu-berlin.de
Received on Wed Sep 28 2011 - 14:15:35 MDT

This archive was generated by hypermail 2.2.0 : Thu Sep 29 2011 - 12:00:02 MDT