Om de ûnderfining foar jo te ferbetterjen is tydlik de funksjonaliteit dan dizze website troch ûnderhâldswurk beheind. Wannear in artikel jo probleem net oplost en jo in fraach stelle wolle, kin ús stipemienskip jo helpe yn @FirefoxSupport op Twitter en /r/firefox op Reddit.

Sykje yn Support

Mij stipescams. Wy sille jo nea freegje in telefoannûmer te beljen, der in sms nei ta te stjoeren of persoanlike gegevens te dielen. Meld fertochte aktiviteit mei de opsje ‘Misbrûk melde’.

Mear ynfo

Dizze konversaasje is argivearre. Stel in nije fraach as jo help nedich hawwe.

wrong encoding for pdf using multipart/form-data

  • 3 antwurd
  • 3 hawwe dit probleem
  • 24 werjeftes
  • Lêste antwurd fan lucio

more options

We have a CGI running on our (Apache/Linux) web server to allow our staff to submit documents. The CGI passes the file as enctype='multipart/form-data'

One of our secretaries is using this CGI within Firefox (unspecified Windows version, alas !) to submit a PDF file. Our CGI rejects this file because it is declared by her firefox as Content-Type: video/x-flv instead of the expected Content-Type: application/pdf

(the PDF file is OK for Acrobat, mail agents recognise it as application/pdf, the CGI running on Linux firefox correctly declares it as application/pdf)

We have a CGI running on our (Apache/Linux) web server to allow our staff to submit documents. The CGI passes the file as enctype='multipart/form-data' One of our secretaries is using this CGI within Firefox (unspecified Windows version, alas !) to submit a PDF file. Our CGI rejects this file because it is declared by her firefox as Content-Type: video/x-flv instead of the expected Content-Type: application/pdf (the PDF file is OK for Acrobat, mail agents recognise it as application/pdf, the CGI running on Linux firefox correctly declares it as application/pdf)

Alle antwurden (3)

more options

This is totally out of my knowledge sphere, but I thought that content types were set by servers, not browsers? So I don't understand how Firefox could set a content type for a file that ends up on a server.

more options

That can be as problem with the MIME database registry key for that file extension and MIME type.

  • MIME Database : HKEY_CLASSES_ROOT\MIME\Database\Content Type
  • HKEY_CLASSES_ROOT\.pdf
more options

You (djst) probably overlooked the fact that I was talking of file UPLOAD. In this case the HTML page contains a FORM declared as METHOD=POST and enctype='multipart/form-data'

see HTML 4 spec at http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13.4.2

In this case it is obviously a task for the browser submitting the file to declare its content type. I am unaware of any technical documentation which describes how firefox associates a mime-type to a file extension, and the non-technical one just refers to viewers or handlers spawned when the browser accesses a file dispatched by the server.

Bewurke troch lucio op