Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

WAMimeType>>fromString: cannot handle a wildcard #655

Closed
GoogleCodeExporter opened this issue Mar 25, 2015 · 3 comments
Closed

WAMimeType>>fromString: cannot handle a wildcard #655

GoogleCodeExporter opened this issue Mar 25, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

1. Send a http request to seaside with an 'accept' header property 'text/html, 
image/gif, image/jpeg, *; q=.2, */*; q=.2'. You can do this by easily by 
opening a HttpUrlConnection in java using the following java  code:

URL uri = new URL("http://localhost:8080/...");
HttpURLConnection conn = (HttpURLConnection) uri.openConnection();
InputStream is = conn.getInputStream();

2. Seaside will try to parse the mimetypes in the 'accept' header property. It 
processes the different chunks separated by a colon, starting with 'text/html, 
etc.

3.When it hits the mimetype *;q=.2 the method WAMimeType>>fromString: fails to 
identify the mimetype. The failure is created due a wrong copyFrom:to: using an 
interval with a negative length. The result is an illegal invocation of 
basicNew.


What is the expected output? What do you see instead?
The FastCGI in Gemstone Glass works fine and apparently can deal with this kind 
of mimetype. I do not know however what mimetype it is using. I would except 
that seaside recognizes this case as a special mimetype. 


Original issue reported on code.google.com by TCleenew...@gmail.com on 13 May 2011 at 12:14

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant