Closed oscarotero closed 8 years ago
Interesting. I have to look at the RFC again, because I don't remember anything about *
only.
I had the problem earlier. I had a client using my API with a java lib which sends Accept: *
. I also looked in the RFC and it's not.
@luxifer so it is invalid anyway? If so, question would be: should we accept such an incorrect behavior?
Yes it is invalid, but I don't think the lib should be so strict because the HTTP RFC is not 100% valid anywhere. There are some edge cases like this one. But what to do? Force the user to encapsulate the statement in a try/catch? Do not throw an exception in that case?
Maybe supporting this would be ok... @oscarotero wanna work on a patch?
Yep, no problem. As soon as I have some time available, I will.
Here's the PR: #73
Hi. From the google spiders, I get the following Accept header:
text/html, image/gif, image/jpeg, *; q=0.2, */*; q=0.2
And this generate the following exception:I think the problem is the first
*
that should be*/*
. Maybe this library should treat*
as equivalent to*/*
?