FAQ
I want to avoid clients timing out while waiting for a server response on
long requests. According the http1.1 spec, you can send http 100 responses
to clients even if they don't expect them.

Is there a way to write out a 100, and then send the real response later on
without hijacking the connection entirely? (and does anyone know if clients
actually handle this correctly?)

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Brad Fitzpatrick at Aug 9, 2013 at 6:54 pm
    I don't think this is a good idea.

    Clients don't handle it well.

    If you control the clients, make them ignore the beginning of the payload
    and send dummy bytes at the beginning. If it's a JavaScript client, send a
    "processing" progress bar to them, flushing out the percent done, followed
    by 100% and then the real payload.


    On Fri, Aug 9, 2013 at 7:09 AM, James Bardin wrote:

    I want to avoid clients timing out while waiting for a server response on
    long requests. According the http1.1 spec, you can send http 100 responses
    to clients even if they don't expect them.

    Is there a way to write out a 100, and then send the real response later
    on without hijacking the connection entirely? (and does anyone know if
    clients actually handle this correctly?)

    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • James Bardin at Aug 9, 2013 at 7:17 pm

    On Friday, August 9, 2013 2:54:33 PM UTC-4, bradfitz wrote:
    I don't think this is a good idea.
    Ha, yeah me too

    Clients don't handle it well.
    This is what I figured, but wasn't to try anyways.

    If you control the clients, make them ignore the beginning of the payload
    and send dummy bytes at the beginning. If it's a JavaScript client, send a
    "processing" progress bar to them, flushing out the percent done, followed
    by 100% and then the real payload.
    Unfortunately I don't control all the clients. What I'm most concerned
    about atm is Cloudfront, where I want to get the result into their cache,
    but expensive requests cam time out before I know how to reply. It looks
    like cloudfront retries after a timeout, so I may setup a short-lived local
    cache to catch these.


    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedAug 9, '13 at 2:09p
activeAug 9, '13 at 7:17p
posts3
users2
websitegolang.org

2 users in discussion

James Bardin: 2 posts Brad Fitzpatrick: 1 post

People

Translate

site design / logo © 2022 Grokbase