rescuecd.spec - problems with sending build request

Patryk Zawadzki patrys at pld-linux.org
Tue Mar 18 22:32:54 CET 2008


2008/3/18 Kamil Dziedzic <kamil.listy at klecza.pl>:
> Dnia wtorek 18 marzec 2008, Patryk Zawadzki napisał:
> > Yes, how do you differentiate between query params and parts of
>  > document name? It's the spec file where encoding should happen (as
>  > currently it's not a valid URI, I believe FTP schema does not even
>  > allow one to use query strings).
>  Why in spec? It is a valid URI.

It's not a valid URI to put in spec. Not if you want to be able to
freely switch between different URI schemas (http:// vs. ftp:// is a
good enough example).

In http schema the "?" character serves the purpose of separating a
document name from a query string. Therefore the question mark is not
part of the document requested, it's there to pass additional
parameters to the http server. It should also not be saved as part of
the file name. The file name should be derived from either response
headers (for example "Disposition" headers allows one to set the
desired file name) or the server's document name (the part between the
last "/" and "?"). wget behaves differently and saves the question
mark as part of the file name which is required for wget's teleport
mode to work (where you request a full website mirror locally).

Even if you asked wget to behave like a usual web browser (and thus
have the correct file name on distfiles), the builder script still has
no idea what name to search for (as the web server is free to pass any
file name in the response headers).

If you want to fix anything, I'd suggest fixing the spec by using an
unambiguous URI.

-- 
Patryk Zawadzki
PLD Linux Distribution


More information about the pld-devel-en mailing list