[Seaside-dev] Subtle but very annoying WAMimeType change
Johan Brichau
johan at inceptive.be
Sun Jun 7 11:09:22 UTC 2020
Hey Sven,
We can correct that. Although ‘application/x-javascript’ should not be used actually (see http://www.rfc-editor.org/rfc/rfc4329.txt <http://www.rfc-editor.org/rfc/rfc4329.txt>)
Can you send it in as an issue on GitHub so I don’t forget?
Thx!
Johan
> On 6 Jun 2020, at 21:34, Sven Van Caekenberghe <sven at stfx.eu> wrote:
>
> Hi,
>
> I finally figured out a subtle but very annoying issue that I had, which comes down to a change in WAMimeType.
>
> "pharo 7"
>
> 'application/javascript' asZnMimeType isBinary.
> "false"
> 'application/x-javascript' asZnMimeType isBinary.
> "false"
>
> "older github://SeasideSt/Seaside:master/repository"
> (WAMimeType main: 'application' sub: 'javascript') isBinary.
> "true"
> (WAMimeType main: 'application' sub: 'x-javascript') isBinary.
> "false"
>
> "newer github://SeasideSt/Seaside:master/repository"
> (WAMimeType main: 'application' sub: 'javascript') isBinary.
> "false"
> (WAMimeType main: 'application' sub: 'x-javascript') isBinary.
> "true"
>
> As you can see the tests are reversed in the later Seaside (which was a diff between my development and deployment image).
>
> This lead to a failure in serving .js files as needed for Bootstrap
>
> I had to change/override
>
> jsbootstrapminJs
> ^ WAFileLibraryResource
> filepath: 'js/bootstrap.min.js'
> mimeType: (WAMimeType main: 'application' sub: 'x-javascript')
> cacheDuration: (Duration days: 0 hours: 0 minutes: 30 seconds: 0)
> contents: (GRDelayedSend receiver: self selector: #jsbootstrapminJsContent)
>
> to
>
> jsbootstrapminJs
> ^ WAFileLibraryResource
> filepath: 'js/bootstrap.min.js'
> mimeType: (WAMimeType main: 'application' sub: 'javascript')
> cacheDuration: (Duration days: 0 hours: 0 minutes: 30 seconds: 0)
> contents: (GRDelayedSend receiver: self selector: #jsbootstrapminJsContent)
>
> Sven
>
>
> _______________________________________________
> seaside-dev mailing list
> seaside-dev at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/seaside-dev/attachments/20200607/c15b2bd5/attachment.html>
More information about the seaside-dev
mailing list