[pbs-devel] [PATCH proxmox-backup] fix #4521: api/tasks: replace upid as filename for task log downloads

Wolfgang Bumiller w.bumiller at proxmox.com
Fri Feb 10 09:43:31 CET 2023


On Thu, Feb 09, 2023 at 05:59:44PM +0100, Thomas Lamprecht wrote:
> On 09/02/2023 15:18, Stefan Sterz wrote:
> >> It contains colons which seem to be turned to spaces by my browser.
> >> Colons in http headers are a bit weird?
> 
> Colons are fine in HTTP header, they don't add any ambiguity on it's own as header
> key's are the part from start of line to the _first_ colon.
> The RFCs (7231 or the updated 9110) allow all printable ASCII chars (0x21 to 0x7E).
> 
> In fact, if I use `curl -OJ`, telling it to use the content-disposition header, it
> does the right thing and safes the file correctly, preserving colons.
> 
> FWICT it's really just due to Windows limitations w.r.t. file naming that the
> browser seemingly spread to all platforms (possibly to avoid that Linux user
> passing files to Windows users breaks) - maybe open a bug there? x)

So what do browsers do with a C source file named 'con.c'? ;-)
(You definitely can't clone a git repo containing such a file on a
certain platform... ;-) )

> 
> >> Maybe we should just strip them out or replace them with underscores or
> >> something?
> 
> > underscores sound good to me.
> > 
> meh... if, we'd need to adapt PVE again, there I already applied this.

I mean, I just found it weird. We have the 'T' for some reason and then
the browser uses spaces for colons, it's ugly. But I also don't really
actually care as long as it works...
(And to be fair, to me, underscores wouldn't even be a *solution*, but
rather a hack because I don't trust browsers...)





More information about the pbs-devel mailing list