Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the HTTP-Tiny CPAN distribution.

Report information
The Basics
Id: 75141
Status: resolved
Priority: 0/
Queue: HTTP-Tiny

People
Owner: Nobody in particular
Requestors: NEILB [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.016
Fixed in: (no value)



Subject: inconsistent value for success on 304 status code
If you call the mirror() method, and the remote file hasn't been modified, you get back a 304 response, and the success field is set to true. But if you make an explicit GET request and add an If-Modified-Since method, you'll get 304, but success will be false. This inconsistency surprised me. I think the latter case should be deemed a success, as the operation has been a success. Either way you still need to check status code to see whether it was a 304.
I see your point, and yet I think it would more confusing to do it that way because it's not consistent with the usual RFC definition of "successful responses". mirror() is a special case and worth giving users that extra convenience. What I will do is more clearly document that only 2XX is success for all other methods in the hopes of avoiding confusion for anyone else. That change is in the repo and will go into the next release. (Closing this ticket.)