Skip to content
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

application/json recognized as a binary mime type #759

Closed
GoogleCodeExporter opened this issue Mar 25, 2015 · 1 comment
Closed

application/json recognized as a binary mime type #759

GoogleCodeExporter opened this issue Mar 25, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

> Unbelievable, this code with Czech characters and MIME type set to text/json 
works well:
>
> GPRestfulHandler(WARestfulHandler)>>czechTestReal
>       <get>
>       <path: 'czechTestReal'>
>       <produces: 'text/json; charset=utf-8'>
>       ^ 'Czech is in Czech čeština.' asJson
>
> This code with Czech characters and MIME type set to application/json throws 
an error.
>
> GPRestfulHandler(WARestfulHandler)>>czechTestReal
>       <get>
>       <path: 'czechTestReal'>
>       <produces: 'application/json; charset=utf-8'>
>       ^ 'Czech is in Czech čeština.' asJson
>
> There is difference only in produces - text/json vs. application/json, but 
there are probably different stream - text vs. binary.

Great that you found it !

Indeed, consider:

(WAMimeType fromString: 'text/json') isBinary. false
(WAMimeType fromString: 'application/json') isBinary. true

(ZnMimeType fromString: 'text/json') isBinary. false
(ZnMimeType fromString: 'application/json') isBinary. false

I made an explicit exception for application/json in ZnMimeType ;-)

Original issue reported on code.google.com by philippe...@gmail.com on 28 Jun 2013 at 7:37

@GoogleCodeExporter
Copy link
Author

Name: Seaside-Core-pmm.770
Author: pmm
Time: 8 September 2013, 11:57:43 am
UUID: 1850f72c-f0c9-44a3-b03d-b90a5344ab09
Ancestors: Seaside-Core-JohanBrichau.769

Issue 759:  application/json recognized as a binary mime type
http://code.google.com/p/seaside/issues/detail?id=759

Name: Seaside-Tests-Core-pmm.258
Author: pmm
Time: 8 September 2013, 11:58:16 am
UUID: e8482e13-f0c2-4bf1-82d9-d24c14e605b8
Ancestors: Seaside-Tests-Core-NickAger.257

Issue 759:  application/json recognized as a binary mime type
http://code.google.com/p/seaside/issues/detail?id=759

Name: Seaside-Core-pmm.790
Author: pmm
Time: 8 September 2013, 12:02:51 pm
UUID: e0ec1992-5caa-4a10-9b4b-47e0c55f3447
Ancestors: Seaside-Core-pmm.789

Issue 759:  application/json recognized as a binary mime type
http://code.google.com/p/seaside/issues/detail?id=759

Name: Seaside-Tests-Core-pmm.267
Author: pmm
Time: 8 September 2013, 12:03:10 pm
UUID: 11b8b4a0-5eb5-4342-b135-7fcc45533a23
Ancestors: Seaside-Tests-Core-pmm.266

Issue 759:  application/json recognized as a binary mime type
http://code.google.com/p/seaside/issues/detail?id=759

Original comment by philippe...@gmail.com on 8 Sep 2013 at 10:04

  • Changed state: Fixed
  • Added labels: ****
  • Removed labels: ****

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

No branches or pull requests

1 participant