in reply to Adding a 'Host' request header leads to unexpected LWP::UserAgent behaviour
BrowserUK - yes, you are of course correct. In my defense, this was in fact one of the first things I considered - but I now see the trap I fell into. I tested the same code with several different sites and when the behaviour was identical I assumed the message was coming from LWP. Then I started tearing my code to pieces and got all flustered.
Turns out though that it wasn't a very good sample because all the sites I tested were WordPress. It seems WordPress has a bunch of hidden redirects (in canonical.php). I am now trying to figure out exactly what is going on there, and what my code is going to do in the WordPress case.
There is of course nothing wrong with LWP! Thanks for your help - and sorry for the false alarm...
|
|---|