Daniel wrote:
On 5/12/2015 6:57 AM, [email protected] wrote:
Daniel wrote:
This afternoon, I got a couple of e-mails from Bugzilla relating to
progress with [Bug 1145504] SeaMonkey discovery pane has a blank space
at the top of the main content unlike Firefox and Thunderbird

The first included a link to
https://bugzilla.mozilla.org/attachment.cgi?id=8695711&action=edit and
when I clicked on that link I was taken to a Bugzilla screen dealing
with "Attachment 8695711 Details for Bug 1145504"

That page tells me "Screen Capture
FireShot Screen Capture #100 - 'Add-ons-Manager' - about_addons.pdf
(application/pdf), 93.99 KB, created by Rainer Bielefeld"

and tells me ....

Attachment is not viewable in your browser because its MIME type
(application/pdf) is not one that your browser is able to display.

I checked my Edit->Prefs->Browser->Helper Apps and entered
"application/pdf" in the search field and was shown that I had set this
up to "Always ask"!

Why wasn't I asked?? Or is that covered by the next line on the
"Attachment 8695711 Details for Bug 1145504" screen, which says
"Download the attachment"?? I would have expected a small screen asking
if I wanted to open, or download.

The message you're seeing is part of the page received from the web
server, which doesn't have direct access to the complete list of plugins
you have installed. It would probably be a privacy and/or security
concern (at least for some people) if that was made available to every
web server you request a page from.

The bugzilla page is trying to display not just the attachment itself,
but a page with a link back to the bug and details about the attachment,
with the attachment embedded in that page. To do that requires a browser
plugin to display the attachment, not just an external application
capable of opening the file. The server is probably determining whether
the browser can do that based on the accept: header which is sent by the
browser when requesting the page. Mine sends:
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Which basically means "I'd prefer text/html, application/xhtml+xml or
application/xml, but if you can't send me that, send me anything (*/*)".
It seems that the server ignores the */* option, presumably since it's
unlikely that the browser actually has a plugin to display absolutely
anything thrown at it. So, having determined that you don't have a
suitable plugin, the server presents a page offering a link to download
the attachment so that you can try opening it in a separate application.

Checking through my about:addons, I don't have anything Adobe installed,
but I do have PDF Viewer which, supposedly, uses HTML5 to display PDT
files directly.

Where do I find the "accept: header"??

The Live HTTP headers addon shows all the headers sent in each request to the server and response from the server as pages are loaded. It can also be used to "replay" requests with the same or modified headers. Not really something for regular use by end users - more a web development and debug tool.

If I insert  into the accept: header (using the Live HTTP
headers addon to replay a modified request), the server returns a page
with a placeholder where it's expecting the PDF to be displayed, and I
get a separate dialog asking if I want to download or open the PDF file.
If I set the helper application for application/pdf to "Use Adobe
Acrobat (in SeaMonkey)" - i.e. the plugin - and send that request again,
the placeholder is filled with the Adobe Acrobat plugin showing the
file. I still have to manually add application/pdf to the accept: header
though; I guess either the Adobe plugin doesn't do anything to cause
that to be done automatically, or the plugin architecture doesn't
provide any means for it to do so.

Mark.

As I replied elsewhere, setting my Helper Apps application/pdf to either
"Use Adobe Reader (Default) or "Use Adobe Acrobat (in SeaMonkey)", I
still get sent to the same page

Yep; the accept: header still needs to be manually modified to let the server know that you have a plugin capable of displaying PDF documents. I did that using the "Live HTTP headers" extension just to see what's going on. If you want to try it for yourself:
- Install the Live HTTP headers extension
- Restart SeaMonkey
- Set the helper app for application/pdf to "Use Adobe Acrobat (in SeaMonkey)"
- Open Tools > Web Development > Live HTTP headers
- Load the page <https://bugzilla.mozilla.org/attachment.cgi?id=8695711&action=edit>
- In Live HTTP headers, scroll up to the first request; it should begin:
    "GET /attachment.cgi?id=8695711&action=edit HTTP/1.1"
- Click on that request, then click "Replay..."
- In the resulting "Live HTTP Replay" window, change the Accept: header line by adding "application/pdf to the list of accepted types, e.g.: Accept: text/html,application/xhtml+xml,application/xml;q=0.9,application/pdf,*/*;q=0.8
- Click "Replay"
- Reload the page; you should see the PDF embedded in the page, instead of the message giving you an option to download the file.

A far easier workaround is to just use the download link to temporarily save the file, and open it.

There might be a preference to set the accept header used, but I haven't looked. If there is, you'd probably want to add "application/pdf," just to the left of "*.*, so that it's available but less preferred than HTML.

Mark.

_______________________________________________
support-seamonkey mailing list
[email protected]
https://lists.mozilla.org/listinfo/support-seamonkey

Reply via email to