Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the WWW-Mechanize-Cached CPAN distribution.

Report information
The Basics
Id: 5705
Status: resolved
Worked: 1.5 hours (90 min)
Priority: 0/
Queue: WWW-Mechanize-Cached

People
Owner: Nobody in particular
Requestors: svhwan_fourms1
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: (no value)
Fixed in: (no value)



Subject: documentation sug - Referer
Under oddities, you say that sometimes it appears that the caching doesn't work because of the Referer. But you don't say how to fix it. Looking at the WWW:Mechanize code, I found it was tracking my last_uri and was only really using that to establish the Referer. So I found that if after every "get," I did a delete $mechObj{'last_uri'}; It cleaned the Referer out of the GET header, and the caching worked. It might be worth mentioning that it the docs. I have also speculated that instead of deleting 'last_uri', I _MIGHT_ be able to do a get with: $mechObj->get($uriToGet, 'Referer' => undef); or maybe '' instead of undef. I'll try and test that in the next week. I don't know if there's some value to keeping the referer, though both of these methods could be used to explicitly set it instead of delete it. But this addresses the Referer issue you brought up in Oddities. -Steve PS I'd also like to be able to explicitly set the expire time on a per-get basis, but I'll try and code that up and submit it later. I had a hack for that in 1.26, but I need to rework it a little and cleean it up in 1.30. It basically came down to overloading the get and intercepting the additional optional parameter. But I think I can do it cleaner than I did the first time.
From: olaf [...] wundersolutions.com
On Wed Mar 17 16:54:10 2004, guest wrote: Show quoted text
> Under oddities, you say that sometimes it appears that the caching > doesn't work because of the Referer. But you don't say how to fix > it. > > Looking at the WWW:Mechanize code, I found it was tracking my > last_uri and was only really using that to establish the Referer. > So I found that if after every "get," I did a > > delete $mechObj{'last_uri'}; > > It cleaned the Referer out of the GET header, and the caching worked. > It might be worth mentioning that it the docs. > I have also speculated that instead of deleting 'last_uri', I > _MIGHT_ be able to do a get with: > > $mechObj->get($uriToGet, 'Referer' => undef); > or maybe '' instead of undef. I'll try and test that in the next > week. > > I don't know if there's some value to keeping the referer, though both > of these methods could be used to explicitly set it instead of > delete it. But this addresses the Referer issue you brought up in > Oddities. > > -Steve > > PS I'd also like to be able to explicitly set the expire time on a > per-get basis, but I'll try and code that up and submit it later. > I had a hack for that in 1.26, but I need to rework it a little and > cleean it up in 1.30. It basically came down to overloading the > get and intercepting the additional optional parameter. But I > think I can do it cleaner than I did the first time.
Hi, I realize it has been a very long time since you opened this ticket. I just recently took over maintenance of this module. Referring to your ticket, I don't see the "oddities" in the documentation for this module anymore. Is it possible this bug has already been cleared up and the ticket just hasn't been closed? If you're still using the module and this is still an issue for you, please let me know. Otherwise I will go ahead and close this ticket. All the best, Olaf
On Wed Oct 07 16:31:05 2009, OALDERS wrote: Show quoted text
> On Wed Mar 17 16:54:10 2004, guest wrote:
> > Under oddities, you say that sometimes it appears that the caching > > doesn't work because of the Referer. But you don't say how to fix > > it.
[...] Show quoted text
> Hi, > > I realize it has been a very long time since you opened this ticket. I > just recently took over maintenance of this module. Referring to your > ticket, I don't see the "oddities" in the documentation for this module > anymore.
Look in the "Bugs and Limitations" section for the string "Referer", not the string "oddities". Based on the current documentation, it appears that the problem still exists.
On Sun Nov 01 09:15:29 2009, MichaelRWolf@att.net wrote: Show quoted text
> On Wed Oct 07 16:31:05 2009, OALDERS wrote:
> > On Wed Mar 17 16:54:10 2004, guest wrote:
> > > Under oddities, you say that sometimes it appears that the caching > > > doesn't work because of the Referer. But you don't say how to fix > > > it.
> > [...] > >
> > Hi, > > > > I realize it has been a very long time since you opened this ticket. I > > just recently took over maintenance of this module. Referring to your > > ticket, I don't see the "oddities" in the documentation for this module > > anymore.
> > Look in the "Bugs and Limitations" section for the string "Referer", not > the string "oddities". Based on the current documentation, it appears > that the problem still exists. >
I finally had a chance to take a closer look at this. It is fixed in 1.36 which will be released to the CPAN in the coming week. Thank you very much for bringing this up. I realize it has been a long time since you initially opened this ticket but at least it's fixed now. :) Thanks, Olaf