devsisters / goquic

QUIC support for Go
http://devsisters.github.io/goquic/
BSD 3-Clause "New" or "Revised" License
944 stars 100 forks source link

Client example failed to read 302 response from reverse proxy with QUIC protocol #56

Open gintau opened 6 years ago

gintau commented 6 years ago

Client example failed to read response when reverse proxy return 302 status. The error message said missing Location header, but from client log I saw it reads correct headers at underlying lib. Is that because the lib parsed headers in lower case and failed its dependent?

[0111/151034:VERBOSE1:spdy_utils.cc(177)] Successfully parsed headers: 
{
  :status:302
  :version:HTTP/1.1
  x-frame-options:SAMEORIGIN
  content-length:0
  x-xss-protection:1; mode=block
  content-language:en-us
  vary:Accept-Language, Cookie
  x-content-type-options:nosniff
  server:apache
  content-security-policy:script-src 'self' 'unsafe-inline' 'unsafe-eval' *.google-analytics.com *.doubleclick.net data:;img-src 'self' *.google-analytics.com *.doubleclick.net http://*.tile.osm.org *.tile.osm.org *.gstatic.com data:;style-src 'self' 'unsafe-inline' fonts.googleapis.com;connect-src 'self';frame-src *;child-src 'self' data: *.vimeo.com;object-src 'none'
  location:http://127.0.0.1:8080/accounts/login/?next=/hue/editor/
  date:Thu, 11 Jan 2018 23:10:34 GMT
  content-type:text/html; charset=utf-8
}

[0111/151034:VERBOSE1:go_quic_spdy_client_stream.cc(102)] headers complete for stream 5
[0111/151034:VERBOSE1:quic_stream_sequencer_buffer.cc(83)] Retired block with index: 0
[0111/151034:VERBOSE1:quic_stream_sequencer_buffer.cc(506)] Removed FrameInfo with offset: 0 and length: 505
[0111/151034:VERBOSE1:quic_flow_controller.cc(50)] Client: Stream 3 consumed: 505
[0111/151034:VERBOSE1:quic_flow_controller.cc(175)] Client: Not sending WindowUpdate for stream 3, available window: 15879 >= threshold: 8192
[0111/151034:VERBOSE1:quic_connection.cc(995)] Client: Got packet 5 for 2405669269133898111
[0111/151034:VERBOSE1:quic_connection.cc(1311)] Client: time of last received packet: 126019722721
[0111/151034:VERBOSE1:quic_connection.cc(671)] Client: Received packet header: { connection_id: 2405669269133898111, connection_id_length: 8, packet_number_length: 1, multipath_flag: 0, reset_flag: 0, version_flag: 0, fec_flag: 0, entropy_flag: 0, entropy hash: 0, path_id: 0, packet_number: 6 }

[0111/151034:VERBOSE1:quic_stream_sequencer.cc(108)] Passing up termination, as we've processed 0 of 0 bytes.
[0111/151034:VERBOSE1:reliable_quic_stream.cc(353)] Client: Done reading from stream 5
[0111/151034:VERBOSE1:reliable_quic_stream.cc(359)] Client: Closing stream: 5
[0111/151034:VERBOSE1:quic_session.cc(309)]  Client: Closing stream 5
[0111/151034:VERBOSE1:quic_flow_controller.cc(50)] Client: Stream 0 consumed: 0
[0111/151034:VERBOSE1:quic_flow_controller.cc(175)] Client: Not sending WindowUpdate for stream 0, available window: 16384 >= threshold: 8192
[0111/151034:VERBOSE1:quic_connection.cc(995)] Client: Got packet 6 for 2405669269133898111
[0111/151034:VERBOSE1:quic_connection.cc(2301)] Bundling ack with outgoing packet.
[0111/151034:VERBOSE1:quic_packet_creator.cc(613)] Adding frame: type { ACK_FRAME } { entropy_hash: 0, largest_observed: 6, ack_delay_time: 149, packets: [ 2 3 4 5 6  ], is_truncated: 0, received_packets: [ 4 at 126019549124 5 at 126019722041 6 at 126019722721  ] }

[0111/151034:VERBOSE1:quic_packet_creator.cc(613)] Adding frame: type { STOP_WAITING_FRAME } { entropy_hash: 0, least_unacked: 4 }

[0111/151034:VERBOSE1:quic_framer.cc(695)] Appending header: { connection_id: 2405669269133898111, connection_id_length: 8, packet_number_length: 1, multipath_flag: 0, reset_flag: 0, version_flag: 0, fec_flag: 0, entropy_flag: 0, entropy hash: 0, path_id: 0, packet_number: 5 }

[0111/151034:VERBOSE1:quic_connection.cc(1646)] Client: Sending packet 5 :  ack only , encryption level: ENCRYPTION_FORWARD_SECURE, encrypted length:41
[0111/151034:VERBOSE1:quic_connection.cc(1705)] Client: time we began writing last sent packet: 126019722930
[0111/151034:VERBOSE1:quic_connection.cc(2046)] Client: Closing connection: 2405669269133898111, with error: QUIC_PEER_GOING_AWAY (16), and details:  Client disconnectiong
[0111/151034:VERBOSE1:quic_connection.cc(2066)] Client: Sending connection close packet.
[0111/151034:VERBOSE1:quic_connection.cc(2301)] Bundling ack with outgoing packet.
[0111/151034:VERBOSE1:quic_packet_creator.cc(613)] Adding frame: type { ACK_FRAME } { entropy_hash: 0, largest_observed: 6, ack_delay_time: 325, packets: [ 2 3 4 5 6  ], is_truncated: 0, received_packets: [ 4 at 126019549124 5 at 126019722041 6 at 126019722721  ] }

[0111/151034:VERBOSE1:quic_packet_creator.cc(613)] Adding frame: type { STOP_WAITING_FRAME } { entropy_hash: 0, least_unacked: 4 }

[0111/151034:VERBOSE1:quic_packet_creator.cc(613)] Adding frame: type { CONNECTION_CLOSE_FRAME } { error_code: 16, error_details: 'Client disconnectiong' }

[0111/151034:VERBOSE1:quic_framer.cc(695)] Appending header: { connection_id: 2405669269133898111, connection_id_length: 8, packet_number_length: 1, multipath_flag: 0, reset_flag: 0, version_flag: 0, fec_flag: 0, entropy_flag: 0, entropy hash: 0, path_id: 0, packet_number: 6 }

[0111/151034:VERBOSE1:quic_connection.cc(1646)] Client: Sending packet 6 : data bearing , encryption level: ENCRYPTION_FORWARD_SECURE, encrypted length:69
[0111/151034:VERBOSE1:quic_connection.cc(1705)] Client: time we began writing last sent packet: 126019723125
panic: Get https://127.0.0.1:8080/hue/editor/: 302 response missing Location header