-
Notifications
You must be signed in to change notification settings - Fork 560
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
handling no content-type header returned #498
Conversation
the server doesn't necessarily have to return a The following is the http response for
|
it's correct that content-type isn't mandatory: http://www.w3.org/Protocols/rfc2616/rfc2616-sec7.html#sec7.2.1 the thing i'm not sure about is whether we should return So if at all, i'd rather return self.content_type = file.info().get('content-type')
- self.content_type = self.content_type.split(";", 1)[0]
+ if self.content_type is not None:
+ self.content_type = self.content_type.split(";", 1)[0] |
both empty string and
I would change the above to:
|
True, but this would change our API semantics. We usually treat If a content-type is specified in HTTP it can't be an empty string, so i think it's worse to suddenly introduce a second undefined In favor of a smaller change i won't touch |
fix handling URLInputSource without content-type, closes #498
still thanks for reporting this and sorry for opting another way ;) |
that's ok. i don't mind too much, to be honest. |
a side question, are you also the maintainer of Fuxi? what is the status of it? i created these fixes because i'm playing with the examples in Fuxi. |
I'd say @chimezie and @gjhiggins, but see RDFLib/FuXi#9 (comment) |
@cliffxuan moved here from #497