Squid does not go to peers for POST requests because they can not be
cached, so obviously the peer will not have it. You will simply abuse the
peer with no benefit. (Same for all non-GET requests.)
See the 'never_direct' directive.
-- Brian
On Thursday 27 June 2002 11:43 am, Ward Vandewege wrote:
> Hi,
>
> There is an issue (bug? feature?) with all squid versions 2.4.x - 2.6.x
> and POST requests.
>
> Basically these versions of squid _never_ use a peer cache server when
> it comes to POST requests.
>
> I am on a crippled internet connection that blocks all outgoing traffic
> to port 80, I need to use the providers' proxy at port 8080. I had a
> problem that POST requests never got through my squid proxy (with
> upstream peer at port 8080), though all other traffic went through fine.
> After some debugging and tracing I found the following bit of code in
> the peer_select.c file:
>
> switch (ps->direct) {
> case DIRECT_YES:
> peerGetSomeDirect(ps);
> break;
> case DIRECT_NO:
> peerGetSomeParent(ps);
> peerGetAllParents(ps);
> break;
> default:
> if (Config.onoff.prefer_direct)
> --> peerGetSomeDirect(ps);
> if (request->flags.hierarchical ||
> !Config.onoff.nonhierarchical_direct)
> peerGetSomeParent(ps);
> if (!Config.onoff.prefer_direct)
> --> peerGetSomeDirect(ps);
> break;
> }
> peerSelectCallback(ps);
>
>
> Compare the lines with the arrows. This doesn't seem very logical. I've
> updated the second occurrance to:
>
> if (!Config.onoff.prefer_direct) {
> peerGetSomeParent(ps);
> peerGetAllParents(ps);
> }
>
> And voila, all of a sudden POST requests worked for me! I have attached
> a patch in diff -u format. All feedback is very welcome...
>
> Bye for now,
> Ward.
Received on Thu Jun 27 2002 - 10:04:04 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:08:51 MST