Anonymous | Login | 01-15-2021 17:25 UTC |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0002454 | [Squeak] Network | major | always | 01-08-06 19:36 | 05-29-06 21:53 | ||||
Reporter | tb | View Status | public | ||||||
Assigned To | tb | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | 3.8 | ||||||
Summary | 0002454: HttpUrl>>retrieveContents does not use correct mime type | ||||||||
Description |
Trying to retrieve a css file from an IIS server will fail if you did something like "http://someserver.com/file.css" [^] because the ACCEPT header is not being set to text/css. There is a mime-file extensions database already in the image, we should use it specify ACCEPT headers properly. Thus, HttpUrl>>retrieveContentsArgs: args ^self retrieveContentsArgs: args accept: 'application/octet-stream' should be changed to: HttpUrl>>retrieveContentsArgs: args ^self retrieveContentsArgs: args accept: (MIMEDocument guessTypeFromName: self) |
||||||||
Additional Information | |||||||||
Attached Files |
![]() ![]() |
||||||||
|
![]() |
|
(0003575 - 18 - 18 - 18 - 18 - 18 - 18) tb 01-20-06 07:06 |
Changeset attached |
(0004837 - 671 - 730 - 1168 - 1168 - 1168 - 1168) Etan Wexler 05-01-06 14:17 |
Guessing the Internet media type (MIME type, Content-Type) is very poor practice. Consult section 2.5, “URI Opacity”, of “Architecture of the World Wide Web, Volume One” ( http://www.w3.org/TR/webarch/#uri-opacity [^] ). The right thing is to accept any Internet media type. Consult section 14.1, “Accept” ( http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1 [^] ), of the specification “Hypertext Transfer Protocol -- HTTP/1.1” (RFC 2616, http://www.rfc-editor.org/rfc/rfc2616.txt [^] ). I recommend an explicit header field: Accept: */*; q=1 The Smalltalk would be as follows: retrieveContentsArgs: args ^self retrieveContentsArgs: args accept: '*/*; q=1' |
(0004844 - 57 - 69 - 69 - 69 - 69 - 69) ducasse 05-02-06 20:57 |
I hope that the IO team will harvest this change. Stef |
(0005053 - 68 - 68 - 228 - 228 - 228 - 228) tb 05-25-06 06:21 |
Harvested as http://source.squeakfoundation.org/IO/Network-tb.28.mcz [^] |
(0005094 - 7 - 7 - 7 - 7 - 7 - 7) ducasse 05-29-06 21:53 |
in 7033 |
Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
73 total queries executed. 43 unique queries executed. |