Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Module is creating an invalid header, with code from resumable_download.inc:
resumable_download_drupal_add_http_header(NULL, 'HTTP/1.0 206 Partial Content');
The output is: ': HTTP/1.0 206 Partial Content:' (should be 'Headername: Value')
This is ignored by most browsers, but some load balancers etc return 502 BAD_GATEWAY
Commenting out this line resolves issue.
Comment | File | Size | Author |
---|---|---|---|
#5 | invalid_header_generated-2362393.patch | 487 bytes | balapalanisamy |
Comments
Comment #1
marleo CreditAttribution: marleo commentedThanks, worked for me.
Comment #2
skye_va CreditAttribution: skye_va commentedHello!
This fixed a substantial issue for me :) so I thought I would write in case this helps anyone else.
I have private videos hosted with Acquia cloud and we tried everything to get them to stream correctly on all browsers, however Safari and iOS would refused to play private videos; public videos worked correctly. Acquia won't enable the XSendFile Apache module, so we were out of luck with enabling the XSendFile-related Drupal module.
Enabling "Resumable Download" as-is also didn't work so we were in a pickle.
I followed the advice above and it worked -- no more 500 errors and the videos play correctly. Should be noted there are two lines with "resumable_download_drupal_add_http_header", you only want to comment out the first one with NULL as the first argument. Instead of hacking the module though I made my own custom copy and did the alterations there.
Comment #3
skye_va CreditAttribution: skye_va commentedFurther to my comment above , while my fix above worked for iOS on mobile and Safari on OSX desktop, it broke for Internet Explorer.
Disabling the module meant that it worked in IE but broke in Safari.
I had to do additional custom coding around the headers to get this work in both IE and Safari.
Comment #4
Jons CreditAttribution: Jons as a volunteer commentedHi skye_va
Interesting comment - can you share your changes?
Comment #5
balapalanisamy CreditAttribution: balapalanisamy as a volunteer and commentedI have created a patch for this.
- Bala
Comment #6
balapalanisamy CreditAttribution: balapalanisamy as a volunteer and commentedComment #7
sinasalek CreditAttribution: sinasalek at Practicalidea commented#2856975: "Empty response header name, aborting request" after Apache upgrade (Debian 7 wheezy) closed as duplicated of this issue, and it has also been confirmd that the pat
Comment #8
bohemier CreditAttribution: bohemier commentedIt seems to me that the two issues refer as a duplicate of the other. Thanks for the patch, it works well for me and fixed the issue that happened on my live server only, I presume because apache is sitting behind nginx acting as a proxy.
Comment #9
宁皓网_王皓 CreditAttribution: 宁皓网_王皓 commentedThank you ~
Comment #10
Jelmer85 CreditAttribution: Jelmer85 commentedHmm, the patch doesn't work for me. I'm having the same problem as others: private videos not loading in Safari (MacOS, iOS). Private PDF files load normally.my bad: I had been experimenting with Xsendfile as well and left that module on. Now it's off and with the patch, I can see my videos. Thanks a lot everyone!I'm starting to doubt if this module does anything at all in my installation, as there are no settings anywhere in my admin pannel (not under filesystem either)..
Comment #11
dmegatool CreditAttribution: dmegatool commented#5 patch works for me too. Thanks !
Comment #12
sinasalek CreditAttribution: sinasalek at Practicalidea commentedNOTICE: I only applied the patches, i have not been able to test it, if someone confirm that everything works properly i can create a new release
https://www.drupal.org/project/resumable_download/releases/7.x-1.x-dev
Comment #13
sinasalek CreditAttribution: sinasalek at Practicalidea commentedComment #15
TTNT CreditAttribution: TTNT commentedHello,
Sorry to open this again, but this issue still occurs.
Removing the line does indeed fix it. I followed this advice a year ago, and had to do the same for a site just now.
My guess is it occurs when a certain PHP version is applied. This time it happened when the host went from PHP5.3 or 5.4 to PHP5.5.
Both times I got header errors, the last website was throwing these when visiting a private video file:
Notice: Array to string conversion in drupal_send_headers() (line 1490 of xxx/WWW/includes/bootstrap.inc).
The result was a 500 error on the video.
Sincerely,