-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getstore does not work sanely with Path::Tiny objects (or any other object) #292
Comments
Do you have a quick code sample to illustrate this? |
|
Stringify the path. Worked here. |
Yes, I know stringification works. But it shouldn't fail silently and return a 200 when given an object like it currently does. |
Gah. Apologies. I completely missed the point of the issue. Failure to read on my part. Agreed, this shouldn't fail silently. |
Heh, no apology needed. I think I've done this once or twice (or ten thousand times). |
After tracing it through (using http://checkip.amazonaws.com/ so that LWP::Protocol::https doesn't get involved), it seems you're right about where the error's occurring. LWP::Protocol->collect() fails since I'll look a bit longer to see where that error should be captured. I tend to agree with you at this point that it's a silent failure. |
If I clean up this PR would that fix the silent failure? libwww-perl/HTTP-Message#25 |
The warning in that PR is better than nothing, but I really think this needs a deeper fix. Maybe |
👍 |
This manifests as silently not writing the content to a file.
I think this is really part of a core bug in LWP, where
LWP::Protocol->collect
is probably dying but that die is being discarded.It seems like
collect
should maybe check if the object in$arg
can be stringified and then use that as a file path. And yes, that's broken and dumb, but so is Perl 5's overloading.But it also seems like a bug that if
collect
is dying (which it has to be) thatgetstore
doesn't catch that.The text was updated successfully, but these errors were encountered: