InstallerInternetBased>>urlGet: and Smalltalkhub

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

InstallerInternetBased>>urlGet: and Smalltalkhub

Max Leske
Hi there

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?

Cheers,
Max
Reply | Threaded
Open this post in threaded view
|

Re: InstallerInternetBased>>urlGet: and Smalltalkhub

Max Leske
Forgot: this is with Squeak4.5-13675 from yesterday.

On 16.02.2014, at 14:49, Max Leske <[hidden email]> wrote:

> Hi there
>
> 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?
>
> Cheers,
> Max


Reply | Threaded
Open this post in threaded view
|

Re: InstallerInternetBased>>urlGet: and Smalltalkhub

Colin Putney-3
In reply to this post by Max Leske



On Sun, Feb 16, 2014 at 8:49 AM, Max Leske <[hidden email]> 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