Project

General

Profile

Actions

tickets #126434

closed

some RAW links on https://paste.opensuse.org/pastes/* want to open in other app instead of current browser tab

Added by mrmazda about 1 year ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Paste
Target version:
-
Start date:
2023-03-22
Due date:
% Done:

0%

Estimated time:

Description

IIRC, it used to always work before the recent pastes.opensuse.org overhaul.
https://paste.opensuse.org/pastes/7f631951c1b8 is just a sample of failure. Based on sampling https://paste.opensuse.org/pastes it appears RAW links to pasted images open as expected in same tab, but not to plain text pastes, such as zypper lr output from *c1b8 that wants to open a different web browser than the one I use for openSUSE QA activities.


Files

Actions #1

Updated by mrmazda about 1 year ago

Copy to clipboard doesn't work either, and the page is prohibiting selection to attempt copy & paste elsewhere to see the unformatted plain text original in plain text format for it to be at all comprehensible. The page source is also useless, littered with markup.

Actions #2

Updated by pjessen about 1 year ago

mrmazda wrote:

IIRC, it used to always work before the recent pastes.opensuse.org overhaul.
https://paste.opensuse.org/pastes/7f631951c1b8 is just a sample of failure. Based on sampling https://paste.opensuse.org/pastes it appears
RAW links to pasted images open as expected in same tab, but not to plain text pastes, such as zypper lr output from *c1b8 that wants to
open a different web browser than the one I use for openSUSE QA activities.

In my firefox, the txt file is just automatically downloaded and saved.

Copy to clipboard doesn't work either,

"Copy link to clipboard" works for me, although it is just a copy of the paste.o.o URL. Not very useful.

and the page is prohibiting selection to attempt copy & paste elsewhere

Here select worked just fine, although I had to right click and hit "Copy" to actually get a copy.

to see the unformatted plain text original in plain text format for it to be at all comprehensible.

Apart from having to scroll to the right to see the repo URLs, I had no problem with seeing the plain text format.

The page source is also useless, littered with markup.

Feel free to submit a PR.

Actions #3

Updated by mrmazda about 1 year ago

Here in latest SeaMonkey, lastest Falkon and latest Palemoon the RAW links produce popups for opening in another application.

I don't know what PR is.

Actions #4

Updated by pjessen about 1 year ago

mrmazda wrote:

Here in latest SeaMonkey, lastest Falkon and latest Palemoon the RAW links produce popups for opening in another application.

That suggests something might be wrong with the MIME type. Using wget, the header looks like this:

Connecting to s3.opensuse-project.net (s3.opensuse-project.net)|2001:67c:2178:8::16|:443... connected.
HTTP request sent, awaiting response... 
  HTTP/1.1 200 OK
  date: Wed, 22 Mar 2023 19:16:16 GMT
  content-type: text/plain
  content-length: 6093
  accept-ranges: bytes
  content-disposition: attachment; filename="3d38969d16b814edcfcfc082cc9965cf.txt"; filename*=UTF-8''3d38969d16b814edcfcfc082cc9965cf.txt
  content-security-policy: block-all-mixed-content
  etag: "ef440f75f680d12c7cf0fa4309ecd2ac"
  last-modified: Wed, 22 Mar 2023 13:09:15 GMT
  no-gzip-compression: true
  vary: Origin
  vary: Accept-Encoding
  x-amz-request-id: 174ED3CA18175171
  x-frame-options: SAMEORIGIN
  x-xss-protection: 1; mode=block
  x-content-type-options: nosniff
  referrer-policy: no-referrer-when-downgrade
  strict-transport-security: max-age=15768000
Length: 6093 (6.0K) [text/plain]

"text/plain" is of course okay, but that content-disposition does look a bit odd. Multiple filenames?

I don't know what PR is.

If you're unhappy with how something is implemented, you fix it and submit a pull request, a PR.

Actions #5

Updated by cboltz about 1 year ago

  • Category set to Paste
  • Assignee set to hellcp
Actions #6

Updated by hellcp about 1 year ago

  • Status changed from New to Feedback

That one should be fixed. If you find out about another kind of an issue like this feel free to let me know what mime type it has, I need to manually enable those

Actions #7

Updated by mrmazda about 1 year ago

Happening again on linked pastes from https://forums.opensuse.org/t/no-hdmi-out-on-asus-computer/165646 with current SeaMonkey 2.53.16.

Actions #8

Updated by pjessen about 1 year ago

mrmazda wrote:

Happening again on linked pastes from https://forums.opensuse.org/t/no-hdmi-out-on-asus-computer/165646 with current SeaMonkey 2.53.16.

Unable to reproduce with Firefox - all four links are downloaded, with MIME-type "text/x-log" which corresponds to the .log extension.
With Chromium, the files are just shown as text. The handling of that MIME type seems to vary, but it might also be dependent on the content-disposition:

content-disposition: inline; filename="G75VW_temp_001-a.log"; filename*=UTF-8''G75VW_temp_001-a.log

"disposition inline" sounds wrong to me, for the raw link. Seems it ought to be "attachment". I don't know about the format of that "filename*" argument, but a quick check of RFC5987 suggests it is correct.

Actions #9

Updated by mrmazda 11 months ago

another that SeaMonkey wants Kate to open:
https://paste.opensuse.org/pastes/cff1b91c21be

Actions #10

Updated by pjessen 11 months ago

mrmazda wrote:

another that SeaMonkey wants Kate to open:
https://paste.opensuse.org/pastes/cff1b91c21be

Again, it's a log file Xorg-0.log- content-type text/x-log. With FF, it was just downloaded. With Chrome, it is rendered in the browser. For a text type, the latter seems most appropriate. I guess your Seamonkey is configured to use Kate for text files.

Actions #11

Updated by pjessen 11 months ago

pjessen wrote:

Again, it's a log file Xorg-0.log- content-type text/x-log. I guess your Seamonkey is configured to use Kate for text files.

As hellcp wrote, this one is fixed. I don't really see much we can or ought to do - the MIME-type is correct, it is the handling in Seamonkey that seems to be the issue.
My Firefox is configured to save text files, but the default is indeed to use Kate, so I guess I changed it at some point. See screenshot.

Actions #12

Updated by hellcp 11 months ago

On the site side, we have the correct headers set to make the browser inline the document if it can handle inlining it, there's pretty much nothing more we can do about it. We could maybe set content-type to text/plain, but that breaks handling that other people may prefer for those files.

Actions #13

Updated by hellcp 5 months ago

  • Status changed from Feedback to Closed

In my opinion, this is resolved, we have the right headers, this is a browser issue

Actions

Also available in: Atom PDF