Announcement

Collapse
No announcement yet.

Turning off chunked Transfer-Encoding

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Turning off chunked Transfer-Encoding

    Anyone know how to stop Transfer-Encoding being set to chunked on a PHP text response? Some browsers and clients don't accept this kind of encoding. Support have told me that this isn't something that can be configured on the server (??) but has to be configured in the script itself. I'm not so sure about this, but wanted to ask if anyone on here has had similar experiences with chunked responses?

  • #2
    Hi!
    To prevent data from being sent out in chunks, you need to buffer the data before sending it to the client. That way you can determine how much data you're going to send. Buffer it and output it with a Content-Length header. That way the Transfer-Encoding won't be chunked.

    Comment


    • #3
      So you're referring to ob_start() and ob_end_flush() right? I tried that method can I couldn't get a result... can you offer a more detailed explanation of your suggested solution?

      Comment


      • #4
        wow thats interesting. I don't have a clue... maybe tell the 80 yr old lady to move for once in her life?

        Comment

        Working...
        X