Issues Recreating Http Headers from an older application

36 views Asked by At

I am having an issue uploading files to my server on a frontend rewrite I am working on.

I am getting an error response 500 "Premature end of script headers:" I have my headers recreated almost exactly the same as the legacy web app I am trying to recreate with two exceptions.

Backstory: I am recreating a Flash web application in Vue.js. I am using the exact same back end intact, it is Perl, cgi scripts, generally, I am able to use axios to talk to the backend scripts no problem.

Current Flash Frontend: When I upload a file with the current flash app my header looks like this.

Old Header

Note the highlighted text at the bottom.

Replacement Vue Frontend: I see a couple differences with my new header, I don't have the Content-Type: application/octet-stream bit directly underneath the filedata part of the header. And the end of the header is "--" which is the convention, I am guessing the old application used some outdated header ending I can't find and doesn't know how to handle mine. Please help I could not find anything on the Google. I also note the new header has "WebKitFormBoundarys" not sure if that could cause an issue with some old header standards or something.

New Header

1

There are 1 answers

0
John Bull On BEST ANSWER

Issues were related to outdated Perl packages, once they were upgraded to backend script recognized the header correctly.