HTTP Content-Type header of binary artifacts

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

HTTP Content-Type header of binary artifacts

Kianwin Ong
Hi,

I am using Hudson with the default Winstone Servlet Engine, and Winstone is returning a HTTP Content-Type header of "text/html;charset=UTF-8" for all files. When downloading binary artifacts from either archived artifacts or the workspace, this causes the files' contents to be displayed inline within the browser window instead of prompting a Save As dialog.

This behavior occurs on Firefox 2.0 (but not IE7). "Right click -> Save as" is a workaround, but developers routinely forget this when they are in a hurry to grab the latest build artifact.

Is there any way to auto-detect the MIME type of the artifacts, or to explicitly override the Content-Type headers of all artifacts?

Thanks!

- Kian Win
Reply | Threaded
Open this post in threaded view
|

Re: HTTP Content-Type header of binary artifacts

Kohsuke Kawaguchi
Administrator
Could you file an issue for this?

It sounds like a bug in Winstone, but I'm sure I can work around it.

2007/6/30, Kianwin Ong <[hidden email]>:

>
> Hi,
>
> I am using Hudson with the default Winstone Servlet Engine, and Winstone is
> returning a HTTP Content-Type header of "text/html;charset=UTF-8" for all
> files. When downloading binary artifacts from either archived artifacts or
> the workspace, this causes the files' contents to be displayed inline within
> the browser window instead of prompting a Save As dialog.
>
> This behavior occurs on Firefox 2.0 (but not IE7). "Right click -> Save as"
> is a workaround, but developers routinely forget this when they are in a
> hurry to grab the latest build artifact.
>
> Is there any way to auto-detect the MIME type of the artifacts, or to
> explicitly override the Content-Type headers of all artifacts?
>
> Thanks!
>
> - Kian Win
> --
> View this message in context: http://www.nabble.com/HTTP-Content-Type-header-of-binary-artifacts-tf4006148.html#a11377356
> Sent from the Hudson users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
Kohsuke Kawaguchi

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: HTTP Content-Type header of binary artifacts

Kianwin Ong
kohsuke wrote
Could you file an issue for this?

It sounds like a bug in Winstone, but I'm sure I can work around it.
That's great. Thanks!

Issue posted at:
https://hudson.dev.java.net/issues/show_bug.cgi?id=627
Reply | Threaded
Open this post in threaded view
|

Re: HTTP Content-Type header of binary artifacts

Kohsuke Kawaguchi
Administrator
Thanks. Fixed for 1.115. If unknown, it will now return
application/octet-stream.

I also filed https://sourceforge.net/tracker/index.php?func=detail&aid=1746201&group_id=98922&atid=622500
to improve this from Winstone side.


2007/7/1, Kianwin Ong <[hidden email]>:

>
>
> kohsuke wrote:
> >
> > Could you file an issue for this?
> >
> > It sounds like a bug in Winstone, but I'm sure I can work around it.
> >
>
> That's great. Thanks!
>
> Issue posted at:
> https://hudson.dev.java.net/issues/show_bug.cgi?id=627
> https://hudson.dev.java.net/issues/show_bug.cgi?id=627
>
> --
> View this message in context: http://www.nabble.com/HTTP-Content-Type-header-of-binary-artifacts-tf4006148.html#a11378490
> Sent from the Hudson users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
Kohsuke Kawaguchi

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: HTTP Content-Type header of binary artifacts

Kianwin Ong
I tried it and everything looks good. Thanks for putting in the fix so quickly!

- Kian Win

kohsuke wrote
Thanks. Fixed for 1.115. If unknown, it will now return
application/octet-stream.

I also filed https://sourceforge.net/tracker/index.php?func=detail&aid=1746201&group_id=98922&atid=622500
to improve this from Winstone side.