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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

marleo’s picture

Thanks, worked for me.

skye_va’s picture

Hello!

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.

skye_va’s picture

Further 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.

Jons’s picture

Hi skye_va
Interesting comment - can you share your changes?

balapalanisamy’s picture

I have created a patch for this.

- Bala

balapalanisamy’s picture

Status: Active » Needs review
sinasalek’s picture

Status: Needs review » Reviewed & tested by the community

#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

bohemier’s picture

It 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.

宁皓网_王皓’s picture

Thank you ~

Jelmer85’s picture

Hmm, 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.
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)..
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!

dmegatool’s picture

#5 patch works for me too. Thanks !

sinasalek’s picture

NOTICE: 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

sinasalek’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

TTNT’s picture

Hello,

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,