[Seaside-dev] Subtle but very annoying WAMimeType change
Sven Van Caekenberghe
sven at stfx.eu
Sun Jun 7 11:30:23 UTC 2020
Johan,
I did not yet look in the repository to figure out what happened.
I think that your commit
https://github.com/SeasideSt/Seaside/commit/78d465878c7ce2839e368efecb4d615b6c6fb005#diff-1a9680844bf1a1cae49e853111e97092
is the one that introduced the change.
I agree that application/x-javascript should be replaced by application/javascript, but in the process you made the old one binary, that seems like a mistake.
I will make an issue.
Sven
> On 7 Jun 2020, at 13:09, Johan Brichau <johan at inceptive.be> wrote:
>
> Hey Sven,
>
> We can correct that. Although ‘application/x-javascript’ should not be used actually (see 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
>
> _______________________________________________
> seaside-dev mailing list
> seaside-dev at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
More information about the seaside-dev
mailing list