1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Duplicate headers received from server

Discussion in 'PHP' started by shabbir, Feb 21, 2013.

  1. shabbir

    shabbir Administrator Staff Member

    Viewing an image through PHP code in Chrome says Duplicate headers received from server but works fine in FF and even in IE9

    The detail of the error is :

     
  2. shabbir

    shabbir Administrator Staff Member

    For those who encounter the same issue here is what is causing the issue and what could be the possible solution.

    The issue is normally when you have a PHP page that displays an image you have the header as

    Code:
    Content-Disposition: Inline; filename=someimagefilename.imageextensions
    Now if you have a filename containing a comma then above headers becomes

    Code:
    Content-Disposition: Inline; filename=someimagefilename,somecharacters.imageextensions
    And this causes chrome to throw an error of double headers - ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOS ITION

    To fix the issue just delete the current file and upload a new file that does not have the comma in the file name or make your code such that if they have comma they are replaced.

    Hope it helps.
     
    ManzZup likes this.

Share This Page