[squeak-dev] InstallerInternetBased>>urlGet: and Smalltalkhub

Colin Putney colin at wiresong.com
Sun Feb 16 15:17:28 UTC 2014


On Sun, Feb 16, 2014 at 8:49 AM, Max Leske <maxleske at gmail.com> wrote:


> There's a problem with the 'Accept' header used by Installer when
> communicating with Smalltalkhub. Smalltalkhub uses a MIME type of
> 'application/x-monticello' mor Monticello packages but Installer uses
> 'application/octet-stream'. This leads to 404 errors. Why not use '*/*'
> there?
>

Hmm, sounds like both client and server are doing the wrong thing here.

Sending "Accept: application/octet-stream" in a request states that the
client will accept arbitrary binary data, without attempting to interpret
it (i.e., the client will store the data in a file or something). But
that's not true in this case; the client is expecting an MCZ file.

On the other hand, the server should never refuse to send a file to a
client that can accept arbitrary data. An MCZ file *is* arbitrary data,
after all. Also, it shouldn't send a 404 response because of an Accept
header. A minimum it should send a 406 response, to indicate that it can't
supply an acceptable data-type for that resource.

We should fix Installer. The proper header would be "Accept:
application/x-monticello,*/*"

Colin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20140216/48f446a4/attachment.htm


More information about the Squeak-dev mailing list