| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This file contains some protocol structures for use with SPDY 2 and 3 | 5 // This file contains some protocol structures for use with SPDY 2 and 3 |
| 6 // The SPDY 2 spec can be found at: | 6 // The SPDY 2 spec can be found at: |
| 7 // http://dev.chromium.org/spdy/spdy-protocol/spdy-protocol-draft2 | 7 // http://dev.chromium.org/spdy/spdy-protocol/spdy-protocol-draft2 |
| 8 // The SPDY 3 spec can be found at: | 8 // The SPDY 3 spec can be found at: |
| 9 // http://dev.chromium.org/spdy/spdy-protocol/spdy-protocol-draft3 | 9 // http://dev.chromium.org/spdy/spdy-protocol/spdy-protocol-draft3 |
| 10 | 10 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 | 51 |
| 52 // Initial window size for a Spdy session in bytes. | 52 // Initial window size for a Spdy session in bytes. |
| 53 const int32 kSpdySessionInitialWindowSize = 64 * 1024; // 64 KBytes | 53 const int32 kSpdySessionInitialWindowSize = 64 * 1024; // 64 KBytes |
| 54 | 54 |
| 55 // Maximum window size for a Spdy stream or session. | 55 // Maximum window size for a Spdy stream or session. |
| 56 const int32 kSpdyMaximumWindowSize = 0x7FFFFFFF; // Max signed 32bit int | 56 const int32 kSpdyMaximumWindowSize = 0x7FFFFFFF; // Max signed 32bit int |
| 57 | 57 |
| 58 // SPDY 2 dictionary. | 58 // SPDY 2 dictionary. |
| 59 // This is just a hacked dictionary to use for shrinking HTTP-like headers. | 59 // This is just a hacked dictionary to use for shrinking HTTP-like headers. |
| 60 const char kV2Dictionary[] = | 60 const char kV2Dictionary[] = |
| 61 "optionsgetheadpostputdeletetraceacceptaccept-charsetaccept-encodingaccept-" | 61 "optionsgetheadpostputdeletetraceacceptaccept-charsetaccept-encodingaccept-" |
| 62 "languageauthorizationexpectfromhostif-modified-sinceif-matchif-none-matchi" | 62 "languageauthorizationexpectfromhostif-modified-sinceif-matchif-none-matchi" |
| 63 "f-rangeif-unmodifiedsincemax-forwardsproxy-authorizationrangerefererteuser" | 63 "f-rangeif-unmodifiedsincemax-forwardsproxy-authorizationrangerefererteuser" |
| 64 "-agent10010120020120220320420520630030130230330430530630740040140240340440" | 64 "-agent10010120020120220320420520630030130230330430530630740040140240340440" |
| 65 "5406407408409410411412413414415416417500501502503504505accept-rangesageeta" | 65 "5406407408409410411412413414415416417500501502503504505accept-rangesageeta" |
| 66 "glocationproxy-authenticatepublicretry-afterservervarywarningwww-authentic" | 66 "glocationproxy-authenticatepublicretry-afterservervarywarningwww-authentic" |
| 67 "ateallowcontent-basecontent-encodingcache-controlconnectiondatetrailertran" | 67 "ateallowcontent-basecontent-encodingcache-controlconnectiondatetrailertran" |
| 68 "sfer-encodingupgradeviawarningcontent-languagecontent-lengthcontent-locati" | 68 "sfer-encodingupgradeviawarningcontent-languagecontent-lengthcontent-locati" |
| 69 "oncontent-md5content-rangecontent-typeetagexpireslast-modifiedset-cookieMo" | 69 "oncontent-md5content-rangecontent-typeetagexpireslast-modifiedset-cookieMo" |
| 70 "ndayTuesdayWednesdayThursdayFridaySaturdaySundayJanFebMarAprMayJunJulAugSe" | 70 "ndayTuesdayWednesdayThursdayFridaySaturdaySundayJanFebMarAprMayJunJulAugSe" |
| 71 "pOctNovDecchunkedtext/htmlimage/pngimage/jpgimage/gifapplication/xmlapplic" | 71 "pOctNovDecchunkedtext/htmlimage/pngimage/jpgimage/gifapplication/xmlapplic" |
| 72 "ation/xhtmltext/plainpublicmax-agecharset=iso-8859-1utf-8gzipdeflateHTTP/1" | 72 "ation/xhtmltext/plainpublicmax-agecharset=iso-8859-1utf-8gzipdeflateHTTP/1" |
| 73 ".1statusversionurl"; | 73 ".1statusversionurl"; |
| 74 const int kV2DictionarySize = arraysize(kV2Dictionary); | 74 const int kV2DictionarySize = arraysize(kV2Dictionary); |
| 75 | 75 |
| 76 // SPDY 3 dictionary. | 76 // SPDY 3 dictionary. |
| 77 const char kV3Dictionary[] = { | 77 const char kV3Dictionary[] = { |
| 78 0x00, 0x00, 0x00, 0x07, 0x6f, 0x70, 0x74, 0x69, // ....opti | 78 0x00, 0x00, 0x00, 0x07, 0x6f, 0x70, 0x74, 0x69, // ....opti |
| 79 0x6f, 0x6e, 0x73, 0x00, 0x00, 0x00, 0x04, 0x68, // ons....h | 79 0x6f, 0x6e, 0x73, 0x00, 0x00, 0x00, 0x04, 0x68, // ons....h |
| 80 0x65, 0x61, 0x64, 0x00, 0x00, 0x00, 0x04, 0x70, // ead....p | 80 0x65, 0x61, 0x64, 0x00, 0x00, 0x00, 0x04, 0x70, // ead....p |
| 81 0x6f, 0x73, 0x74, 0x00, 0x00, 0x00, 0x03, 0x70, // ost....p | 81 0x6f, 0x73, 0x74, 0x00, 0x00, 0x00, 0x03, 0x70, // ost....p |
| 82 0x75, 0x74, 0x00, 0x00, 0x00, 0x06, 0x64, 0x65, // ut....de | 82 0x75, 0x74, 0x00, 0x00, 0x00, 0x06, 0x64, 0x65, // ut....de |
| 83 0x6c, 0x65, 0x74, 0x65, 0x00, 0x00, 0x00, 0x05, // lete.... | 83 0x6c, 0x65, 0x74, 0x65, 0x00, 0x00, 0x00, 0x05, // lete.... |
| 84 0x74, 0x72, 0x61, 0x63, 0x65, 0x00, 0x00, 0x00, // trace... | 84 0x74, 0x72, 0x61, 0x63, 0x65, 0x00, 0x00, 0x00, // trace... |
| 85 0x06, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x00, // .accept. | 85 0x06, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x00, // .accept. |
| 86 0x00, 0x00, 0x0e, 0x61, 0x63, 0x63, 0x65, 0x70, // ...accep | 86 0x00, 0x00, 0x0e, 0x61, 0x63, 0x63, 0x65, 0x70, // ...accep |
| 87 0x74, 0x2d, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, // t-charse | 87 0x74, 0x2d, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, // t-charse |
| 88 0x74, 0x00, 0x00, 0x00, 0x0f, 0x61, 0x63, 0x63, // t....acc | 88 0x74, 0x00, 0x00, 0x00, 0x0f, 0x61, 0x63, 0x63, // t....acc |
| 89 0x65, 0x70, 0x74, 0x2d, 0x65, 0x6e, 0x63, 0x6f, // ept-enco | 89 0x65, 0x70, 0x74, 0x2d, 0x65, 0x6e, 0x63, 0x6f, // ept-enco |
| 90 0x64, 0x69, 0x6e, 0x67, 0x00, 0x00, 0x00, 0x0f, // ding.... | 90 0x64, 0x69, 0x6e, 0x67, 0x00, 0x00, 0x00, 0x0f, // ding.... |
| 91 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x6c, // accept-l | 91 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x6c, // accept-l |
| 92 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x00, // anguage. | 92 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x00, // anguage. |
| 93 0x00, 0x00, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x70, // ...accep | 93 0x00, 0x00, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x70, // ...accep |
| 94 0x74, 0x2d, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, // t-ranges | 94 0x74, 0x2d, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, // t-ranges |
| 95 0x00, 0x00, 0x00, 0x03, 0x61, 0x67, 0x65, 0x00, // ....age. | 95 0x00, 0x00, 0x00, 0x03, 0x61, 0x67, 0x65, 0x00, // ....age. |
| 96 0x00, 0x00, 0x05, 0x61, 0x6c, 0x6c, 0x6f, 0x77, // ...allow | 96 0x00, 0x00, 0x05, 0x61, 0x6c, 0x6c, 0x6f, 0x77, // ...allow |
| 97 0x00, 0x00, 0x00, 0x0d, 0x61, 0x75, 0x74, 0x68, // ....auth | 97 0x00, 0x00, 0x00, 0x0d, 0x61, 0x75, 0x74, 0x68, // ....auth |
| 98 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, // orizatio | 98 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, // orizatio |
| 99 0x6e, 0x00, 0x00, 0x00, 0x0d, 0x63, 0x61, 0x63, // n....cac | 99 0x6e, 0x00, 0x00, 0x00, 0x0d, 0x63, 0x61, 0x63, // n....cac |
| 100 0x68, 0x65, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, // he-contr | 100 0x68, 0x65, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, // he-contr |
| 101 0x6f, 0x6c, 0x00, 0x00, 0x00, 0x0a, 0x63, 0x6f, // ol....co | 101 0x6f, 0x6c, 0x00, 0x00, 0x00, 0x0a, 0x63, 0x6f, // ol....co |
| 102 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, // nnection | 102 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, // nnection |
| 103 0x00, 0x00, 0x00, 0x0c, 0x63, 0x6f, 0x6e, 0x74, // ....cont | 103 0x00, 0x00, 0x00, 0x0c, 0x63, 0x6f, 0x6e, 0x74, // ....cont |
| 104 0x65, 0x6e, 0x74, 0x2d, 0x62, 0x61, 0x73, 0x65, // ent-base | 104 0x65, 0x6e, 0x74, 0x2d, 0x62, 0x61, 0x73, 0x65, // ent-base |
| 105 0x00, 0x00, 0x00, 0x10, 0x63, 0x6f, 0x6e, 0x74, // ....cont | 105 0x00, 0x00, 0x00, 0x10, 0x63, 0x6f, 0x6e, 0x74, // ....cont |
| 106 0x65, 0x6e, 0x74, 0x2d, 0x65, 0x6e, 0x63, 0x6f, // ent-enco | 106 0x65, 0x6e, 0x74, 0x2d, 0x65, 0x6e, 0x63, 0x6f, // ent-enco |
| 107 0x64, 0x69, 0x6e, 0x67, 0x00, 0x00, 0x00, 0x10, // ding.... | 107 0x64, 0x69, 0x6e, 0x67, 0x00, 0x00, 0x00, 0x10, // ding.... |
| 108 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, // content- | 108 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, // content- |
| 109 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, // language | 109 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, // language |
| 110 0x00, 0x00, 0x00, 0x0e, 0x63, 0x6f, 0x6e, 0x74, // ....cont | 110 0x00, 0x00, 0x00, 0x0e, 0x63, 0x6f, 0x6e, 0x74, // ....cont |
| 111 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x65, 0x6e, 0x67, // ent-leng | 111 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x65, 0x6e, 0x67, // ent-leng |
| 112 0x74, 0x68, 0x00, 0x00, 0x00, 0x10, 0x63, 0x6f, // th....co | 112 0x74, 0x68, 0x00, 0x00, 0x00, 0x10, 0x63, 0x6f, // th....co |
| 113 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x6f, // ntent-lo | 113 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x6f, // ntent-lo |
| 114 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, // cation.. | 114 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, // cation.. |
| 115 0x00, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, // ..conten | 115 0x00, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, // ..conten |
| 116 0x74, 0x2d, 0x6d, 0x64, 0x35, 0x00, 0x00, 0x00, // t-md5... | 116 0x74, 0x2d, 0x6d, 0x64, 0x35, 0x00, 0x00, 0x00, // t-md5... |
| 117 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, // .content | 117 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, // .content |
| 118 0x2d, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x00, 0x00, // -range.. | 118 0x2d, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x00, 0x00, // -range.. |
| 119 0x00, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, // ..conten | 119 0x00, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, // ..conten |
| 120 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x00, 0x00, // t-type.. | 120 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x00, 0x00, // t-type.. |
| 121 0x00, 0x04, 0x64, 0x61, 0x74, 0x65, 0x00, 0x00, // ..date.. | 121 0x00, 0x04, 0x64, 0x61, 0x74, 0x65, 0x00, 0x00, // ..date.. |
| 122 0x00, 0x04, 0x65, 0x74, 0x61, 0x67, 0x00, 0x00, // ..etag.. | 122 0x00, 0x04, 0x65, 0x74, 0x61, 0x67, 0x00, 0x00, // ..etag.. |
| 123 0x00, 0x06, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, // ..expect | 123 0x00, 0x06, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, // ..expect |
| 124 0x00, 0x00, 0x00, 0x07, 0x65, 0x78, 0x70, 0x69, // ....expi | 124 0x00, 0x00, 0x00, 0x07, 0x65, 0x78, 0x70, 0x69, // ....expi |
| 125 0x72, 0x65, 0x73, 0x00, 0x00, 0x00, 0x04, 0x66, // res....f | 125 0x72, 0x65, 0x73, 0x00, 0x00, 0x00, 0x04, 0x66, // res....f |
| 126 0x72, 0x6f, 0x6d, 0x00, 0x00, 0x00, 0x04, 0x68, // rom....h | 126 0x72, 0x6f, 0x6d, 0x00, 0x00, 0x00, 0x04, 0x68, // rom....h |
| 127 0x6f, 0x73, 0x74, 0x00, 0x00, 0x00, 0x08, 0x69, // ost....i | 127 0x6f, 0x73, 0x74, 0x00, 0x00, 0x00, 0x08, 0x69, // ost....i |
| 128 0x66, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x00, // f-match. | 128 0x66, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x00, // f-match. |
| 129 0x00, 0x00, 0x11, 0x69, 0x66, 0x2d, 0x6d, 0x6f, // ...if-mo | 129 0x00, 0x00, 0x11, 0x69, 0x66, 0x2d, 0x6d, 0x6f, // ...if-mo |
| 130 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x2d, 0x73, // dified-s | 130 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x2d, 0x73, // dified-s |
| 131 0x69, 0x6e, 0x63, 0x65, 0x00, 0x00, 0x00, 0x0d, // ince.... | 131 0x69, 0x6e, 0x63, 0x65, 0x00, 0x00, 0x00, 0x0d, // ince.... |
| 132 0x69, 0x66, 0x2d, 0x6e, 0x6f, 0x6e, 0x65, 0x2d, // if-none- | 132 0x69, 0x66, 0x2d, 0x6e, 0x6f, 0x6e, 0x65, 0x2d, // if-none- |
| 133 0x6d, 0x61, 0x74, 0x63, 0x68, 0x00, 0x00, 0x00, // match... | 133 0x6d, 0x61, 0x74, 0x63, 0x68, 0x00, 0x00, 0x00, // match... |
| 134 0x08, 0x69, 0x66, 0x2d, 0x72, 0x61, 0x6e, 0x67, // .if-rang | 134 0x08, 0x69, 0x66, 0x2d, 0x72, 0x61, 0x6e, 0x67, // .if-rang |
| 135 0x65, 0x00, 0x00, 0x00, 0x13, 0x69, 0x66, 0x2d, // e....if- | 135 0x65, 0x00, 0x00, 0x00, 0x13, 0x69, 0x66, 0x2d, // e....if- |
| 136 0x75, 0x6e, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, // unmodifi | 136 0x75, 0x6e, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, // unmodifi |
| 137 0x65, 0x64, 0x2d, 0x73, 0x69, 0x6e, 0x63, 0x65, // ed-since | 137 0x65, 0x64, 0x2d, 0x73, 0x69, 0x6e, 0x63, 0x65, // ed-since |
| 138 0x00, 0x00, 0x00, 0x0d, 0x6c, 0x61, 0x73, 0x74, // ....last | 138 0x00, 0x00, 0x00, 0x0d, 0x6c, 0x61, 0x73, 0x74, // ....last |
| 139 0x2d, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, // -modifie | 139 0x2d, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, // -modifie |
| 140 0x64, 0x00, 0x00, 0x00, 0x08, 0x6c, 0x6f, 0x63, // d....loc | 140 0x64, 0x00, 0x00, 0x00, 0x08, 0x6c, 0x6f, 0x63, // d....loc |
| 141 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, // ation... | 141 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, // ation... |
| 142 0x0c, 0x6d, 0x61, 0x78, 0x2d, 0x66, 0x6f, 0x72, // .max-for | 142 0x0c, 0x6d, 0x61, 0x78, 0x2d, 0x66, 0x6f, 0x72, // .max-for |
| 143 0x77, 0x61, 0x72, 0x64, 0x73, 0x00, 0x00, 0x00, // wards... | 143 0x77, 0x61, 0x72, 0x64, 0x73, 0x00, 0x00, 0x00, // wards... |
| 144 0x06, 0x70, 0x72, 0x61, 0x67, 0x6d, 0x61, 0x00, // .pragma. | 144 0x06, 0x70, 0x72, 0x61, 0x67, 0x6d, 0x61, 0x00, // .pragma. |
| 145 0x00, 0x00, 0x12, 0x70, 0x72, 0x6f, 0x78, 0x79, // ...proxy | 145 0x00, 0x00, 0x12, 0x70, 0x72, 0x6f, 0x78, 0x79, // ...proxy |
| 146 0x2d, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, // -authent | 146 0x2d, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, // -authent |
| 147 0x69, 0x63, 0x61, 0x74, 0x65, 0x00, 0x00, 0x00, // icate... | 147 0x69, 0x63, 0x61, 0x74, 0x65, 0x00, 0x00, 0x00, // icate... |
| 148 0x13, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2d, 0x61, // .proxy-a | 148 0x13, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2d, 0x61, // .proxy-a |
| 149 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, // uthoriza | 149 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, // uthoriza |
| 150 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, // tion.... | 150 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05, // tion.... |
| 151 0x72, 0x61, 0x6e, 0x67, 0x65, 0x00, 0x00, 0x00, // range... | 151 0x72, 0x61, 0x6e, 0x67, 0x65, 0x00, 0x00, 0x00, // range... |
| 152 0x07, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x72, // .referer | 152 0x07, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x72, // .referer |
| 153 0x00, 0x00, 0x00, 0x0b, 0x72, 0x65, 0x74, 0x72, // ....retr | 153 0x00, 0x00, 0x00, 0x0b, 0x72, 0x65, 0x74, 0x72, // ....retr |
| 154 0x79, 0x2d, 0x61, 0x66, 0x74, 0x65, 0x72, 0x00, // y-after. | 154 0x79, 0x2d, 0x61, 0x66, 0x74, 0x65, 0x72, 0x00, // y-after. |
| 155 0x00, 0x00, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, // ...serve | 155 0x00, 0x00, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, // ...serve |
| 156 0x72, 0x00, 0x00, 0x00, 0x02, 0x74, 0x65, 0x00, // r....te. | 156 0x72, 0x00, 0x00, 0x00, 0x02, 0x74, 0x65, 0x00, // r....te. |
| 157 0x00, 0x00, 0x07, 0x74, 0x72, 0x61, 0x69, 0x6c, // ...trail | 157 0x00, 0x00, 0x07, 0x74, 0x72, 0x61, 0x69, 0x6c, // ...trail |
| 158 0x65, 0x72, 0x00, 0x00, 0x00, 0x11, 0x74, 0x72, // er....tr | 158 0x65, 0x72, 0x00, 0x00, 0x00, 0x11, 0x74, 0x72, // er....tr |
| 159 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x2d, 0x65, // ansfer-e | 159 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x2d, 0x65, // ansfer-e |
| 160 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x00, // ncoding. | 160 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x00, // ncoding. |
| 161 0x00, 0x00, 0x07, 0x75, 0x70, 0x67, 0x72, 0x61, // ...upgra | 161 0x00, 0x00, 0x07, 0x75, 0x70, 0x67, 0x72, 0x61, // ...upgra |
| 162 0x64, 0x65, 0x00, 0x00, 0x00, 0x0a, 0x75, 0x73, // de....us | 162 0x64, 0x65, 0x00, 0x00, 0x00, 0x0a, 0x75, 0x73, // de....us |
| 163 0x65, 0x72, 0x2d, 0x61, 0x67, 0x65, 0x6e, 0x74, // er-agent | 163 0x65, 0x72, 0x2d, 0x61, 0x67, 0x65, 0x6e, 0x74, // er-agent |
| 164 0x00, 0x00, 0x00, 0x04, 0x76, 0x61, 0x72, 0x79, // ....vary | 164 0x00, 0x00, 0x00, 0x04, 0x76, 0x61, 0x72, 0x79, // ....vary |
| 165 0x00, 0x00, 0x00, 0x03, 0x76, 0x69, 0x61, 0x00, // ....via. | 165 0x00, 0x00, 0x00, 0x03, 0x76, 0x69, 0x61, 0x00, // ....via. |
| 166 0x00, 0x00, 0x07, 0x77, 0x61, 0x72, 0x6e, 0x69, // ...warni | 166 0x00, 0x00, 0x07, 0x77, 0x61, 0x72, 0x6e, 0x69, // ...warni |
| 167 0x6e, 0x67, 0x00, 0x00, 0x00, 0x10, 0x77, 0x77, // ng....ww | 167 0x6e, 0x67, 0x00, 0x00, 0x00, 0x10, 0x77, 0x77, // ng....ww |
| 168 0x77, 0x2d, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, // w-authen | 168 0x77, 0x2d, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, // w-authen |
| 169 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x00, 0x00, // ticate.. | 169 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x00, 0x00, // ticate.. |
| 170 0x00, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, // ..method | 170 0x00, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, // ..method |
| 171 0x00, 0x00, 0x00, 0x03, 0x67, 0x65, 0x74, 0x00, // ....get. | 171 0x00, 0x00, 0x00, 0x03, 0x67, 0x65, 0x74, 0x00, // ....get. |
| 172 0x00, 0x00, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, // ...statu | 172 0x00, 0x00, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, // ...statu |
| 173 0x73, 0x00, 0x00, 0x00, 0x06, 0x32, 0x30, 0x30, // s....200 | 173 0x73, 0x00, 0x00, 0x00, 0x06, 0x32, 0x30, 0x30, // s....200 |
| 174 0x20, 0x4f, 0x4b, 0x00, 0x00, 0x00, 0x07, 0x76, // .OK....v | 174 0x20, 0x4f, 0x4b, 0x00, 0x00, 0x00, 0x07, 0x76, // .OK....v |
| 175 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x00, 0x00, // ersion.. | 175 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x00, 0x00, // ersion.. |
| 176 0x00, 0x08, 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, // ..HTTP.1 | 176 0x00, 0x08, 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, // ..HTTP.1 |
| 177 0x2e, 0x31, 0x00, 0x00, 0x00, 0x03, 0x75, 0x72, // .1....ur | 177 0x2e, 0x31, 0x00, 0x00, 0x00, 0x03, 0x75, 0x72, // .1....ur |
| 178 0x6c, 0x00, 0x00, 0x00, 0x06, 0x70, 0x75, 0x62, // l....pub | 178 0x6c, 0x00, 0x00, 0x00, 0x06, 0x70, 0x75, 0x62, // l....pub |
| 179 0x6c, 0x69, 0x63, 0x00, 0x00, 0x00, 0x0a, 0x73, // lic....s | 179 0x6c, 0x69, 0x63, 0x00, 0x00, 0x00, 0x0a, 0x73, // lic....s |
| 180 0x65, 0x74, 0x2d, 0x63, 0x6f, 0x6f, 0x6b, 0x69, // et-cooki | 180 0x65, 0x74, 0x2d, 0x63, 0x6f, 0x6f, 0x6b, 0x69, // et-cooki |
| 181 0x65, 0x00, 0x00, 0x00, 0x0a, 0x6b, 0x65, 0x65, // e....kee | 181 0x65, 0x00, 0x00, 0x00, 0x0a, 0x6b, 0x65, 0x65, // e....kee |
| 182 0x70, 0x2d, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x00, // p-alive. | 182 0x70, 0x2d, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x00, // p-alive. |
| 183 0x00, 0x00, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, // ...origi | 183 0x00, 0x00, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, // ...origi |
| 184 0x6e, 0x31, 0x30, 0x30, 0x31, 0x30, 0x31, 0x32, // n1001012 | 184 0x6e, 0x31, 0x30, 0x30, 0x31, 0x30, 0x31, 0x32, // n1001012 |
| 185 0x30, 0x31, 0x32, 0x30, 0x32, 0x32, 0x30, 0x35, // 01202205 | 185 0x30, 0x31, 0x32, 0x30, 0x32, 0x32, 0x30, 0x35, // 01202205 |
| 186 0x32, 0x30, 0x36, 0x33, 0x30, 0x30, 0x33, 0x30, // 20630030 | 186 0x32, 0x30, 0x36, 0x33, 0x30, 0x30, 0x33, 0x30, // 20630030 |
| 187 0x32, 0x33, 0x30, 0x33, 0x33, 0x30, 0x34, 0x33, // 23033043 | 187 0x32, 0x33, 0x30, 0x33, 0x33, 0x30, 0x34, 0x33, // 23033043 |
| 188 0x30, 0x35, 0x33, 0x30, 0x36, 0x33, 0x30, 0x37, // 05306307 | 188 0x30, 0x35, 0x33, 0x30, 0x36, 0x33, 0x30, 0x37, // 05306307 |
| 189 0x34, 0x30, 0x32, 0x34, 0x30, 0x35, 0x34, 0x30, // 40240540 | 189 0x34, 0x30, 0x32, 0x34, 0x30, 0x35, 0x34, 0x30, // 40240540 |
| 190 0x36, 0x34, 0x30, 0x37, 0x34, 0x30, 0x38, 0x34, // 64074084 | 190 0x36, 0x34, 0x30, 0x37, 0x34, 0x30, 0x38, 0x34, // 64074084 |
| 191 0x30, 0x39, 0x34, 0x31, 0x30, 0x34, 0x31, 0x31, // 09410411 | 191 0x30, 0x39, 0x34, 0x31, 0x30, 0x34, 0x31, 0x31, // 09410411 |
| 192 0x34, 0x31, 0x32, 0x34, 0x31, 0x33, 0x34, 0x31, // 41241341 | 192 0x34, 0x31, 0x32, 0x34, 0x31, 0x33, 0x34, 0x31, // 41241341 |
| 193 0x34, 0x34, 0x31, 0x35, 0x34, 0x31, 0x36, 0x34, // 44154164 | 193 0x34, 0x34, 0x31, 0x35, 0x34, 0x31, 0x36, 0x34, // 44154164 |
| 194 0x31, 0x37, 0x35, 0x30, 0x32, 0x35, 0x30, 0x34, // 17502504 | 194 0x31, 0x37, 0x35, 0x30, 0x32, 0x35, 0x30, 0x34, // 17502504 |
| 195 0x35, 0x30, 0x35, 0x32, 0x30, 0x33, 0x20, 0x4e, // 505203.N | 195 0x35, 0x30, 0x35, 0x32, 0x30, 0x33, 0x20, 0x4e, // 505203.N |
| 196 0x6f, 0x6e, 0x2d, 0x41, 0x75, 0x74, 0x68, 0x6f, // on-Autho | 196 0x6f, 0x6e, 0x2d, 0x41, 0x75, 0x74, 0x68, 0x6f, // on-Autho |
| 197 0x72, 0x69, 0x74, 0x61, 0x74, 0x69, 0x76, 0x65, // ritative | 197 0x72, 0x69, 0x74, 0x61, 0x74, 0x69, 0x76, 0x65, // ritative |
| 198 0x20, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, // .Informa | 198 0x20, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, // .Informa |
| 199 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x30, 0x34, 0x20, // tion204. | 199 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x30, 0x34, 0x20, // tion204. |
| 200 0x4e, 0x6f, 0x20, 0x43, 0x6f, 0x6e, 0x74, 0x65, // No.Conte | 200 0x4e, 0x6f, 0x20, 0x43, 0x6f, 0x6e, 0x74, 0x65, // No.Conte |
| 201 0x6e, 0x74, 0x33, 0x30, 0x31, 0x20, 0x4d, 0x6f, // nt301.Mo | 201 0x6e, 0x74, 0x33, 0x30, 0x31, 0x20, 0x4d, 0x6f, // nt301.Mo |
| 202 0x76, 0x65, 0x64, 0x20, 0x50, 0x65, 0x72, 0x6d, // ved.Perm | 202 0x76, 0x65, 0x64, 0x20, 0x50, 0x65, 0x72, 0x6d, // ved.Perm |
| 203 0x61, 0x6e, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x34, // anently4 | 203 0x61, 0x6e, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x34, // anently4 |
| 204 0x30, 0x30, 0x20, 0x42, 0x61, 0x64, 0x20, 0x52, // 00.Bad.R | 204 0x30, 0x30, 0x20, 0x42, 0x61, 0x64, 0x20, 0x52, // 00.Bad.R |
| 205 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x34, 0x30, // equest40 | 205 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x34, 0x30, // equest40 |
| 206 0x31, 0x20, 0x55, 0x6e, 0x61, 0x75, 0x74, 0x68, // 1.Unauth | 206 0x31, 0x20, 0x55, 0x6e, 0x61, 0x75, 0x74, 0x68, // 1.Unauth |
| 207 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x34, 0x30, // orized40 | 207 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x34, 0x30, // orized40 |
| 208 0x33, 0x20, 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64, // 3.Forbid | 208 0x33, 0x20, 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64, // 3.Forbid |
| 209 0x64, 0x65, 0x6e, 0x34, 0x30, 0x34, 0x20, 0x4e, // den404.N | 209 0x64, 0x65, 0x6e, 0x34, 0x30, 0x34, 0x20, 0x4e, // den404.N |
| 210 0x6f, 0x74, 0x20, 0x46, 0x6f, 0x75, 0x6e, 0x64, // ot.Found | 210 0x6f, 0x74, 0x20, 0x46, 0x6f, 0x75, 0x6e, 0x64, // ot.Found |
| 211 0x35, 0x30, 0x30, 0x20, 0x49, 0x6e, 0x74, 0x65, // 500.Inte | 211 0x35, 0x30, 0x30, 0x20, 0x49, 0x6e, 0x74, 0x65, // 500.Inte |
| 212 0x72, 0x6e, 0x61, 0x6c, 0x20, 0x53, 0x65, 0x72, // rnal.Ser | 212 0x72, 0x6e, 0x61, 0x6c, 0x20, 0x53, 0x65, 0x72, // rnal.Ser |
| 213 0x76, 0x65, 0x72, 0x20, 0x45, 0x72, 0x72, 0x6f, // ver.Erro | 213 0x76, 0x65, 0x72, 0x20, 0x45, 0x72, 0x72, 0x6f, // ver.Erro |
| 214 0x72, 0x35, 0x30, 0x31, 0x20, 0x4e, 0x6f, 0x74, // r501.Not | 214 0x72, 0x35, 0x30, 0x31, 0x20, 0x4e, 0x6f, 0x74, // r501.Not |
| 215 0x20, 0x49, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, // .Impleme | 215 0x20, 0x49, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, // .Impleme |
| 216 0x6e, 0x74, 0x65, 0x64, 0x35, 0x30, 0x33, 0x20, // nted503. | 216 0x6e, 0x74, 0x65, 0x64, 0x35, 0x30, 0x33, 0x20, // nted503. |
| 217 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, // Service. | 217 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, // Service. |
| 218 0x55, 0x6e, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, // Unavaila | 218 0x55, 0x6e, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, // Unavaila |
| 219 0x62, 0x6c, 0x65, 0x4a, 0x61, 0x6e, 0x20, 0x46, // bleJan.F | 219 0x62, 0x6c, 0x65, 0x4a, 0x61, 0x6e, 0x20, 0x46, // bleJan.F |
| 220 0x65, 0x62, 0x20, 0x4d, 0x61, 0x72, 0x20, 0x41, // eb.Mar.A | 220 0x65, 0x62, 0x20, 0x4d, 0x61, 0x72, 0x20, 0x41, // eb.Mar.A |
| 221 0x70, 0x72, 0x20, 0x4d, 0x61, 0x79, 0x20, 0x4a, // pr.May.J | 221 0x70, 0x72, 0x20, 0x4d, 0x61, 0x79, 0x20, 0x4a, // pr.May.J |
| 222 0x75, 0x6e, 0x20, 0x4a, 0x75, 0x6c, 0x20, 0x41, // un.Jul.A | 222 0x75, 0x6e, 0x20, 0x4a, 0x75, 0x6c, 0x20, 0x41, // un.Jul.A |
| 223 0x75, 0x67, 0x20, 0x53, 0x65, 0x70, 0x74, 0x20, // ug.Sept. | 223 0x75, 0x67, 0x20, 0x53, 0x65, 0x70, 0x74, 0x20, // ug.Sept. |
| 224 0x4f, 0x63, 0x74, 0x20, 0x4e, 0x6f, 0x76, 0x20, // Oct.Nov. | 224 0x4f, 0x63, 0x74, 0x20, 0x4e, 0x6f, 0x76, 0x20, // Oct.Nov. |
| 225 0x44, 0x65, 0x63, 0x20, 0x30, 0x30, 0x3a, 0x30, // Dec.00.0 | 225 0x44, 0x65, 0x63, 0x20, 0x30, 0x30, 0x3a, 0x30, // Dec.00.0 |
| 226 0x30, 0x3a, 0x30, 0x30, 0x20, 0x4d, 0x6f, 0x6e, // 0.00.Mon | 226 0x30, 0x3a, 0x30, 0x30, 0x20, 0x4d, 0x6f, 0x6e, // 0.00.Mon |
| 227 0x2c, 0x20, 0x54, 0x75, 0x65, 0x2c, 0x20, 0x57, // ..Tue..W | 227 0x2c, 0x20, 0x54, 0x75, 0x65, 0x2c, 0x20, 0x57, // ..Tue..W |
| 228 0x65, 0x64, 0x2c, 0x20, 0x54, 0x68, 0x75, 0x2c, // ed..Thu. | 228 0x65, 0x64, 0x2c, 0x20, 0x54, 0x68, 0x75, 0x2c, // ed..Thu. |
| 229 0x20, 0x46, 0x72, 0x69, 0x2c, 0x20, 0x53, 0x61, // .Fri..Sa | 229 0x20, 0x46, 0x72, 0x69, 0x2c, 0x20, 0x53, 0x61, // .Fri..Sa |
| 230 0x74, 0x2c, 0x20, 0x53, 0x75, 0x6e, 0x2c, 0x20, // t..Sun.. | 230 0x74, 0x2c, 0x20, 0x53, 0x75, 0x6e, 0x2c, 0x20, // t..Sun.. |
| 231 0x47, 0x4d, 0x54, 0x63, 0x68, 0x75, 0x6e, 0x6b, // GMTchunk | 231 0x47, 0x4d, 0x54, 0x63, 0x68, 0x75, 0x6e, 0x6b, // GMTchunk |
| 232 0x65, 0x64, 0x2c, 0x74, 0x65, 0x78, 0x74, 0x2f, // ed.text. | 232 0x65, 0x64, 0x2c, 0x74, 0x65, 0x78, 0x74, 0x2f, // ed.text. |
| 233 0x68, 0x74, 0x6d, 0x6c, 0x2c, 0x69, 0x6d, 0x61, // html.ima | 233 0x68, 0x74, 0x6d, 0x6c, 0x2c, 0x69, 0x6d, 0x61, // html.ima |
| 234 0x67, 0x65, 0x2f, 0x70, 0x6e, 0x67, 0x2c, 0x69, // ge.png.i | 234 0x67, 0x65, 0x2f, 0x70, 0x6e, 0x67, 0x2c, 0x69, // ge.png.i |
| 235 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x6a, 0x70, 0x67, // mage.jpg | 235 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x6a, 0x70, 0x67, // mage.jpg |
| 236 0x2c, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x67, // .image.g | 236 0x2c, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x67, // .image.g |
| 237 0x69, 0x66, 0x2c, 0x61, 0x70, 0x70, 0x6c, 0x69, // if.appli | 237 0x69, 0x66, 0x2c, 0x61, 0x70, 0x70, 0x6c, 0x69, // if.appli |
| 238 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, // cation.x | 238 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, // cation.x |
| 239 0x6d, 0x6c, 0x2c, 0x61, 0x70, 0x70, 0x6c, 0x69, // ml.appli | 239 0x6d, 0x6c, 0x2c, 0x61, 0x70, 0x70, 0x6c, 0x69, // ml.appli |
| 240 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, // cation.x | 240 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, // cation.x |
| 241 0x68, 0x74, 0x6d, 0x6c, 0x2b, 0x78, 0x6d, 0x6c, // html.xml | 241 0x68, 0x74, 0x6d, 0x6c, 0x2b, 0x78, 0x6d, 0x6c, // html.xml |
| 242 0x2c, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x70, 0x6c, // .text.pl | 242 0x2c, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x70, 0x6c, // .text.pl |
| 243 0x61, 0x69, 0x6e, 0x2c, 0x74, 0x65, 0x78, 0x74, // ain.text | 243 0x61, 0x69, 0x6e, 0x2c, 0x74, 0x65, 0x78, 0x74, // ain.text |
| 244 0x2f, 0x6a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, // .javascr | 244 0x2f, 0x6a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, // .javascr |
| 245 0x69, 0x70, 0x74, 0x2c, 0x70, 0x75, 0x62, 0x6c, // ipt.publ | 245 0x69, 0x70, 0x74, 0x2c, 0x70, 0x75, 0x62, 0x6c, // ipt.publ |
| 246 0x69, 0x63, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, // icprivat | 246 0x69, 0x63, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, // icprivat |
| 247 0x65, 0x6d, 0x61, 0x78, 0x2d, 0x61, 0x67, 0x65, // emax-age | 247 0x65, 0x6d, 0x61, 0x78, 0x2d, 0x61, 0x67, 0x65, // emax-age |
| 248 0x3d, 0x67, 0x7a, 0x69, 0x70, 0x2c, 0x64, 0x65, // .gzip.de | 248 0x3d, 0x67, 0x7a, 0x69, 0x70, 0x2c, 0x64, 0x65, // .gzip.de |
| 249 0x66, 0x6c, 0x61, 0x74, 0x65, 0x2c, 0x73, 0x64, // flate.sd | 249 0x66, 0x6c, 0x61, 0x74, 0x65, 0x2c, 0x73, 0x64, // flate.sd |
| 250 0x63, 0x68, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, // chcharse | 250 0x63, 0x68, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, // chcharse |
| 251 0x74, 0x3d, 0x75, 0x74, 0x66, 0x2d, 0x38, 0x63, // t.utf-8c | 251 0x74, 0x3d, 0x75, 0x74, 0x66, 0x2d, 0x38, 0x63, // t.utf-8c |
| 252 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x3d, 0x69, // harset.i | 252 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x3d, 0x69, // harset.i |
| 253 0x73, 0x6f, 0x2d, 0x38, 0x38, 0x35, 0x39, 0x2d, // so-8859- | 253 0x73, 0x6f, 0x2d, 0x38, 0x38, 0x35, 0x39, 0x2d, // so-8859- |
| 254 0x31, 0x2c, 0x75, 0x74, 0x66, 0x2d, 0x2c, 0x2a, // 1.utf-.. | 254 0x31, 0x2c, 0x75, 0x74, 0x66, 0x2d, 0x2c, 0x2a, // 1.utf-.. |
| 255 0x2c, 0x65, 0x6e, 0x71, 0x3d, 0x30, 0x2e // .enq.0. | 255 0x2c, 0x65, 0x6e, 0x71, 0x3d, 0x30, 0x2e // .enq.0. |
| 256 }; | 256 }; |
| 257 const int kV3DictionarySize = arraysize(kV3Dictionary); | 257 const int kV3DictionarySize = arraysize(kV3Dictionary); |
| 258 | 258 |
| 259 // The HTTP/2 connection header prefix, which must be the first bytes | 259 // The HTTP/2 connection header prefix, which must be the first bytes |
| 260 // sent by the client upon starting an HTTP/2 connection, and which | 260 // sent by the client upon starting an HTTP/2 connection, and which |
| 261 // must be followed by a SETTINGS frame. | 261 // must be followed by a SETTINGS frame. |
| 262 // | 262 // |
| 263 // Equivalent to the string "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" | 263 // Equivalent to the string "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" |
| 264 // (without the null terminator). | 264 // (without the null terminator). |
| 265 const char kHttp2ConnectionHeaderPrefix[] = { | 265 const char kHttp2ConnectionHeaderPrefix[] = { |
| 266 0x50, 0x52, 0x49, 0x20, 0x2a, 0x20, 0x48, 0x54, // PRI * HT | 266 0x50, 0x52, 0x49, 0x20, 0x2a, |
| 267 0x54, 0x50, 0x2f, 0x32, 0x2e, 0x30, 0x0d, 0x0a, // TP/2.0.. | 267 0x20, 0x48, 0x54, // PRI * HT |
| 268 0x0d, 0x0a, 0x53, 0x4d, 0x0d, 0x0a, 0x0d, 0x0a // ..SM.... | 268 0x54, 0x50, 0x2f, 0x32, 0x2e, |
| 269 0x30, 0x0d, 0x0a, // TP/2.0.. |
| 270 0x0d, 0x0a, 0x53, 0x4d, 0x0d, |
| 271 0x0a, 0x0d, 0x0a // ..SM.... |
| 269 }; | 272 }; |
| 270 const int kHttp2ConnectionHeaderPrefixSize = | 273 const int kHttp2ConnectionHeaderPrefixSize = |
| 271 arraysize(kHttp2ConnectionHeaderPrefix); | 274 arraysize(kHttp2ConnectionHeaderPrefix); |
| 272 | 275 |
| 273 // Types of SPDY frames. | 276 // Types of SPDY frames. |
| 274 enum SpdyFrameType { | 277 enum SpdyFrameType { |
| 275 DATA = 0, | 278 DATA = 0, |
| 276 SYN_STREAM = 1, | 279 SYN_STREAM = 1, |
| 277 FIRST_CONTROL_TYPE = SYN_STREAM, | 280 FIRST_CONTROL_TYPE = SYN_STREAM, |
| 278 SYN_REPLY, | 281 SYN_REPLY, |
| 279 RST_STREAM, | 282 RST_STREAM, |
| 280 SETTINGS, | 283 SETTINGS, |
| 281 NOOP, // Because it is valid in SPDY/2, kept for identifiability/enum order. | 284 NOOP, // Because it is valid in SPDY/2, kept for identifiability/enum order. |
| 282 PING, | 285 PING, |
| 283 GOAWAY, | 286 GOAWAY, |
| 284 HEADERS, | 287 HEADERS, |
| 285 WINDOW_UPDATE, | 288 WINDOW_UPDATE, |
| 286 CREDENTIAL, // No longer valid. Kept for identifiability/enum order. | 289 CREDENTIAL, // No longer valid. Kept for identifiability/enum order. |
| 287 BLOCKED, | 290 BLOCKED, |
| 288 PUSH_PROMISE, | 291 PUSH_PROMISE, |
| 289 CONTINUATION, | 292 CONTINUATION, |
| 290 LAST_CONTROL_TYPE = CONTINUATION | 293 LAST_CONTROL_TYPE = CONTINUATION |
| 291 }; | 294 }; |
| 292 | 295 |
| 293 // Flags on data packets. | 296 // Flags on data packets. |
| 294 enum SpdyDataFlags { | 297 enum SpdyDataFlags { |
| 295 DATA_FLAG_NONE = 0x00, | 298 DATA_FLAG_NONE = 0x00, |
| 296 DATA_FLAG_FIN = 0x01, | 299 DATA_FLAG_FIN = 0x01, |
| 297 DATA_FLAG_END_SEGMENT = 0x02, | 300 DATA_FLAG_END_SEGMENT = 0x02, |
| 298 DATA_FLAG_PAD_LOW = 0x10, | 301 DATA_FLAG_PAD_LOW = 0x10, |
| 299 DATA_FLAG_PAD_HIGH = 0x20 | 302 DATA_FLAG_PAD_HIGH = 0x20 |
| 300 }; | 303 }; |
| 301 | 304 |
| 302 // Flags on control packets | 305 // Flags on control packets |
| 303 enum SpdyControlFlags { | 306 enum SpdyControlFlags { |
| 304 CONTROL_FLAG_NONE = 0, | 307 CONTROL_FLAG_NONE = 0, |
| 305 CONTROL_FLAG_FIN = 1, | 308 CONTROL_FLAG_FIN = 1, |
| 306 CONTROL_FLAG_UNIDIRECTIONAL = 2 | 309 CONTROL_FLAG_UNIDIRECTIONAL = 2 |
| 307 }; | 310 }; |
| 308 | 311 |
| 309 enum SpdyPingFlags { | 312 enum SpdyPingFlags { |
| 310 PING_FLAG_ACK = 0x1, | 313 PING_FLAG_ACK = 0x1, |
| 311 }; | 314 }; |
| 312 | 315 |
| 313 enum SpdyHeadersFlags { | 316 enum SpdyHeadersFlags { |
| 314 HEADERS_FLAG_END_HEADERS = 0x4, | 317 HEADERS_FLAG_END_HEADERS = 0x4, |
| 315 HEADERS_FLAG_PRIORITY = 0x8 | 318 HEADERS_FLAG_PRIORITY = 0x8 |
| 316 }; | 319 }; |
| 317 | 320 |
| 318 enum SpdyPushPromiseFlags { | 321 enum SpdyPushPromiseFlags { PUSH_PROMISE_FLAG_END_PUSH_PROMISE = 0x4 }; |
| 319 PUSH_PROMISE_FLAG_END_PUSH_PROMISE = 0x4 | |
| 320 }; | |
| 321 | 322 |
| 322 // Flags on the SETTINGS control frame. | 323 // Flags on the SETTINGS control frame. |
| 323 enum SpdySettingsControlFlags { | 324 enum SpdySettingsControlFlags { |
| 324 SETTINGS_FLAG_CLEAR_PREVIOUSLY_PERSISTED_SETTINGS = 0x1 | 325 SETTINGS_FLAG_CLEAR_PREVIOUSLY_PERSISTED_SETTINGS = 0x1 |
| 325 }; | 326 }; |
| 326 | 327 |
| 327 enum Http2SettingsControlFlags { | 328 enum Http2SettingsControlFlags { |
| 328 SETTINGS_FLAG_ACK = 0x1, | 329 SETTINGS_FLAG_ACK = 0x1, |
| 329 }; | 330 }; |
| 330 | 331 |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 // Abstract class intended to be inherited by IRs that have the option of a FIN | 549 // Abstract class intended to be inherited by IRs that have the option of a FIN |
| 549 // flag. Implies SpdyFrameWithStreamIdIR. | 550 // flag. Implies SpdyFrameWithStreamIdIR. |
| 550 class NET_EXPORT_PRIVATE SpdyFrameWithFinIR : public SpdyFrameWithStreamIdIR { | 551 class NET_EXPORT_PRIVATE SpdyFrameWithFinIR : public SpdyFrameWithStreamIdIR { |
| 551 public: | 552 public: |
| 552 virtual ~SpdyFrameWithFinIR() {} | 553 virtual ~SpdyFrameWithFinIR() {} |
| 553 bool fin() const { return fin_; } | 554 bool fin() const { return fin_; } |
| 554 void set_fin(bool fin) { fin_ = fin; } | 555 void set_fin(bool fin) { fin_ = fin; } |
| 555 | 556 |
| 556 protected: | 557 protected: |
| 557 explicit SpdyFrameWithFinIR(SpdyStreamId stream_id) | 558 explicit SpdyFrameWithFinIR(SpdyStreamId stream_id) |
| 558 : SpdyFrameWithStreamIdIR(stream_id), | 559 : SpdyFrameWithStreamIdIR(stream_id), fin_(false) {} |
| 559 fin_(false) {} | |
| 560 | 560 |
| 561 private: | 561 private: |
| 562 bool fin_; | 562 bool fin_; |
| 563 | 563 |
| 564 DISALLOW_COPY_AND_ASSIGN(SpdyFrameWithFinIR); | 564 DISALLOW_COPY_AND_ASSIGN(SpdyFrameWithFinIR); |
| 565 }; | 565 }; |
| 566 | 566 |
| 567 // Abstract class intended to be inherited by IRs that contain a name-value | 567 // Abstract class intended to be inherited by IRs that contain a name-value |
| 568 // block. Implies SpdyFrameWithFinIR. | 568 // block. Implies SpdyFrameWithFinIR. |
| 569 class NET_EXPORT_PRIVATE SpdyFrameWithNameValueBlockIR | 569 class NET_EXPORT_PRIVATE SpdyFrameWithNameValueBlockIR |
| 570 : public NON_EXPORTED_BASE(SpdyFrameWithFinIR) { | 570 : public NON_EXPORTED_BASE(SpdyFrameWithFinIR) { |
| 571 public: | 571 public: |
| 572 const SpdyNameValueBlock& name_value_block() const { | 572 const SpdyNameValueBlock& name_value_block() const { |
| 573 return name_value_block_; | 573 return name_value_block_; |
| 574 } | 574 } |
| 575 void set_name_value_block(const SpdyNameValueBlock& name_value_block) { | 575 void set_name_value_block(const SpdyNameValueBlock& name_value_block) { |
| 576 // Deep copy. | 576 // Deep copy. |
| 577 name_value_block_ = name_value_block; | 577 name_value_block_ = name_value_block; |
| 578 } | 578 } |
| 579 void SetHeader(const base::StringPiece& name, | 579 void SetHeader(const base::StringPiece& name, |
| 580 const base::StringPiece& value) { | 580 const base::StringPiece& value) { |
| 581 name_value_block_[name.as_string()] = value.as_string(); | 581 name_value_block_[name.as_string()] = value.as_string(); |
| 582 } | 582 } |
| 583 SpdyNameValueBlock* mutable_name_value_block() { | 583 SpdyNameValueBlock* mutable_name_value_block() { return &name_value_block_; } |
| 584 return &name_value_block_; | |
| 585 } | |
| 586 | 584 |
| 587 protected: | 585 protected: |
| 588 explicit SpdyFrameWithNameValueBlockIR(SpdyStreamId stream_id); | 586 explicit SpdyFrameWithNameValueBlockIR(SpdyStreamId stream_id); |
| 589 virtual ~SpdyFrameWithNameValueBlockIR(); | 587 virtual ~SpdyFrameWithNameValueBlockIR(); |
| 590 | 588 |
| 591 private: | 589 private: |
| 592 SpdyNameValueBlock name_value_block_; | 590 SpdyNameValueBlock name_value_block_; |
| 593 | 591 |
| 594 DISALLOW_COPY_AND_ASSIGN(SpdyFrameWithNameValueBlockIR); | 592 DISALLOW_COPY_AND_ASSIGN(SpdyFrameWithNameValueBlockIR); |
| 595 }; | 593 }; |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 694 : SpdyFrameWithNameValueBlockIR(stream_id) {} | 692 : SpdyFrameWithNameValueBlockIR(stream_id) {} |
| 695 | 693 |
| 696 virtual void Visit(SpdyFrameVisitor* visitor) const OVERRIDE; | 694 virtual void Visit(SpdyFrameVisitor* visitor) const OVERRIDE; |
| 697 | 695 |
| 698 private: | 696 private: |
| 699 DISALLOW_COPY_AND_ASSIGN(SpdySynReplyIR); | 697 DISALLOW_COPY_AND_ASSIGN(SpdySynReplyIR); |
| 700 }; | 698 }; |
| 701 | 699 |
| 702 class NET_EXPORT_PRIVATE SpdyRstStreamIR : public SpdyFrameWithStreamIdIR { | 700 class NET_EXPORT_PRIVATE SpdyRstStreamIR : public SpdyFrameWithStreamIdIR { |
| 703 public: | 701 public: |
| 704 SpdyRstStreamIR(SpdyStreamId stream_id, SpdyRstStreamStatus status, | 702 SpdyRstStreamIR(SpdyStreamId stream_id, |
| 703 SpdyRstStreamStatus status, |
| 705 base::StringPiece description); | 704 base::StringPiece description); |
| 706 | 705 |
| 707 virtual ~SpdyRstStreamIR(); | 706 virtual ~SpdyRstStreamIR(); |
| 708 | 707 |
| 709 SpdyRstStreamStatus status() const { | 708 SpdyRstStreamStatus status() const { return status_; } |
| 710 return status_; | 709 void set_status(SpdyRstStreamStatus status) { status_ = status; } |
| 711 } | |
| 712 void set_status(SpdyRstStreamStatus status) { | |
| 713 status_ = status; | |
| 714 } | |
| 715 | 710 |
| 716 base::StringPiece description() const { return description_; } | 711 base::StringPiece description() const { return description_; } |
| 717 | 712 |
| 718 void set_description(base::StringPiece description) { | 713 void set_description(base::StringPiece description) { |
| 719 description_ = description; | 714 description_ = description; |
| 720 } | 715 } |
| 721 | 716 |
| 722 virtual void Visit(SpdyFrameVisitor* visitor) const OVERRIDE; | 717 virtual void Visit(SpdyFrameVisitor* visitor) const OVERRIDE; |
| 723 | 718 |
| 724 private: | 719 private: |
| 725 SpdyRstStreamStatus status_; | 720 SpdyRstStreamStatus status_; |
| 726 base::StringPiece description_; | 721 base::StringPiece description_; |
| 727 | 722 |
| 728 DISALLOW_COPY_AND_ASSIGN(SpdyRstStreamIR); | 723 DISALLOW_COPY_AND_ASSIGN(SpdyRstStreamIR); |
| 729 }; | 724 }; |
| 730 | 725 |
| 731 class NET_EXPORT_PRIVATE SpdySettingsIR : public SpdyFrameIR { | 726 class NET_EXPORT_PRIVATE SpdySettingsIR : public SpdyFrameIR { |
| 732 public: | 727 public: |
| 733 // Associates flags with a value. | 728 // Associates flags with a value. |
| 734 struct Value { | 729 struct Value { |
| 735 Value() : persist_value(false), | 730 Value() : persist_value(false), persisted(false), value(0) {} |
| 736 persisted(false), | |
| 737 value(0) {} | |
| 738 bool persist_value; | 731 bool persist_value; |
| 739 bool persisted; | 732 bool persisted; |
| 740 int32 value; | 733 int32 value; |
| 741 }; | 734 }; |
| 742 typedef std::map<SpdySettingsIds, Value> ValueMap; | 735 typedef std::map<SpdySettingsIds, Value> ValueMap; |
| 743 | 736 |
| 744 SpdySettingsIR(); | 737 SpdySettingsIR(); |
| 745 | 738 |
| 746 virtual ~SpdySettingsIR(); | 739 virtual ~SpdySettingsIR(); |
| 747 | 740 |
| 748 // Overwrites as appropriate. | 741 // Overwrites as appropriate. |
| 749 const ValueMap& values() const { return values_; } | 742 const ValueMap& values() const { return values_; } |
| 750 void AddSetting(SpdySettingsIds id, | 743 void AddSetting(SpdySettingsIds id, |
| 751 bool persist_value, | 744 bool persist_value, |
| 752 bool persisted, | 745 bool persisted, |
| 753 int32 value) { | 746 int32 value) { |
| 754 values_[id].persist_value = persist_value; | 747 values_[id].persist_value = persist_value; |
| 755 values_[id].persisted = persisted; | 748 values_[id].persisted = persisted; |
| 756 values_[id].value = value; | 749 values_[id].value = value; |
| 757 } | 750 } |
| 758 | 751 |
| 759 bool clear_settings() const { return clear_settings_; } | 752 bool clear_settings() const { return clear_settings_; } |
| 760 void set_clear_settings(bool clear_settings) { | 753 void set_clear_settings(bool clear_settings) { |
| 761 clear_settings_ = clear_settings; | 754 clear_settings_ = clear_settings; |
| 762 } | 755 } |
| 763 bool is_ack() const { return is_ack_; } | 756 bool is_ack() const { return is_ack_; } |
| 764 void set_is_ack(bool is_ack) { | 757 void set_is_ack(bool is_ack) { is_ack_ = is_ack; } |
| 765 is_ack_ = is_ack; | |
| 766 } | |
| 767 | 758 |
| 768 virtual void Visit(SpdyFrameVisitor* visitor) const OVERRIDE; | 759 virtual void Visit(SpdyFrameVisitor* visitor) const OVERRIDE; |
| 769 | 760 |
| 770 private: | 761 private: |
| 771 ValueMap values_; | 762 ValueMap values_; |
| 772 bool clear_settings_; | 763 bool clear_settings_; |
| 773 bool is_ack_; | 764 bool is_ack_; |
| 774 | 765 |
| 775 DISALLOW_COPY_AND_ASSIGN(SpdySettingsIR); | 766 DISALLOW_COPY_AND_ASSIGN(SpdySettingsIR); |
| 776 }; | 767 }; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 788 | 779 |
| 789 private: | 780 private: |
| 790 SpdyPingId id_; | 781 SpdyPingId id_; |
| 791 bool is_ack_; | 782 bool is_ack_; |
| 792 | 783 |
| 793 DISALLOW_COPY_AND_ASSIGN(SpdyPingIR); | 784 DISALLOW_COPY_AND_ASSIGN(SpdyPingIR); |
| 794 }; | 785 }; |
| 795 | 786 |
| 796 class NET_EXPORT_PRIVATE SpdyGoAwayIR : public SpdyFrameIR { | 787 class NET_EXPORT_PRIVATE SpdyGoAwayIR : public SpdyFrameIR { |
| 797 public: | 788 public: |
| 798 SpdyGoAwayIR(SpdyStreamId last_good_stream_id, SpdyGoAwayStatus status, | 789 SpdyGoAwayIR(SpdyStreamId last_good_stream_id, |
| 790 SpdyGoAwayStatus status, |
| 799 const base::StringPiece& description); | 791 const base::StringPiece& description); |
| 800 virtual ~SpdyGoAwayIR(); | 792 virtual ~SpdyGoAwayIR(); |
| 801 SpdyStreamId last_good_stream_id() const { return last_good_stream_id_; } | 793 SpdyStreamId last_good_stream_id() const { return last_good_stream_id_; } |
| 802 void set_last_good_stream_id(SpdyStreamId last_good_stream_id) { | 794 void set_last_good_stream_id(SpdyStreamId last_good_stream_id) { |
| 803 DCHECK_LE(0u, last_good_stream_id); | 795 DCHECK_LE(0u, last_good_stream_id); |
| 804 DCHECK_EQ(0u, last_good_stream_id & ~kStreamIdMask); | 796 DCHECK_EQ(0u, last_good_stream_id & ~kStreamIdMask); |
| 805 last_good_stream_id_ = last_good_stream_id; | 797 last_good_stream_id_ = last_good_stream_id; |
| 806 } | 798 } |
| 807 SpdyGoAwayStatus status() const { return status_; } | 799 SpdyGoAwayStatus status() const { return status_; } |
| 808 void set_status(SpdyGoAwayStatus status) { | 800 void set_status(SpdyGoAwayStatus status) { |
| 809 // TODO(hkhalil): Check valid ranges of status? | 801 // TODO(hkhalil): Check valid ranges of status? |
| 810 status_ = status; | 802 status_ = status; |
| 811 } | 803 } |
| 812 | 804 |
| 813 const base::StringPiece& description() const; | 805 const base::StringPiece& description() const; |
| 814 | 806 |
| 815 virtual void Visit(SpdyFrameVisitor* visitor) const OVERRIDE; | 807 virtual void Visit(SpdyFrameVisitor* visitor) const OVERRIDE; |
| 816 | 808 |
| 817 private: | 809 private: |
| 818 SpdyStreamId last_good_stream_id_; | 810 SpdyStreamId last_good_stream_id_; |
| 819 SpdyGoAwayStatus status_; | 811 SpdyGoAwayStatus status_; |
| 820 const base::StringPiece description_; | 812 const base::StringPiece description_; |
| 821 | 813 |
| 822 DISALLOW_COPY_AND_ASSIGN(SpdyGoAwayIR); | 814 DISALLOW_COPY_AND_ASSIGN(SpdyGoAwayIR); |
| 823 }; | 815 }; |
| 824 | 816 |
| 825 class NET_EXPORT_PRIVATE SpdyHeadersIR : public SpdyFrameWithNameValueBlockIR { | 817 class NET_EXPORT_PRIVATE SpdyHeadersIR : public SpdyFrameWithNameValueBlockIR { |
| 826 public: | 818 public: |
| 827 explicit SpdyHeadersIR(SpdyStreamId stream_id) | 819 explicit SpdyHeadersIR(SpdyStreamId stream_id) |
| 828 : SpdyFrameWithNameValueBlockIR(stream_id), | 820 : SpdyFrameWithNameValueBlockIR(stream_id), |
| 829 end_headers_(true), | 821 end_headers_(true), |
| 830 has_priority_(false), | 822 has_priority_(false), |
| 831 priority_(0) {} | 823 priority_(0) {} |
| 832 | 824 |
| 833 virtual void Visit(SpdyFrameVisitor* visitor) const OVERRIDE; | 825 virtual void Visit(SpdyFrameVisitor* visitor) const OVERRIDE; |
| 834 | 826 |
| 835 bool end_headers() const { return end_headers_; } | 827 bool end_headers() const { return end_headers_; } |
| 836 void set_end_headers(bool end_headers) {end_headers_ = end_headers;} | 828 void set_end_headers(bool end_headers) { end_headers_ = end_headers; } |
| 837 bool has_priority() const { return has_priority_; } | 829 bool has_priority() const { return has_priority_; } |
| 838 void set_has_priority(bool has_priority) { has_priority_ = has_priority; } | 830 void set_has_priority(bool has_priority) { has_priority_ = has_priority; } |
| 839 uint32 priority() const { return priority_; } | 831 uint32 priority() const { return priority_; } |
| 840 void set_priority(SpdyPriority priority) { priority_ = priority; } | 832 void set_priority(SpdyPriority priority) { priority_ = priority; } |
| 841 | 833 |
| 842 private: | 834 private: |
| 843 bool end_headers_; | 835 bool end_headers_; |
| 844 bool has_priority_; | 836 bool has_priority_; |
| 845 // 31-bit priority. | 837 // 31-bit priority. |
| 846 uint32 priority_; | 838 uint32 priority_; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 901 bool end_push_promise_; | 893 bool end_push_promise_; |
| 902 DISALLOW_COPY_AND_ASSIGN(SpdyPushPromiseIR); | 894 DISALLOW_COPY_AND_ASSIGN(SpdyPushPromiseIR); |
| 903 }; | 895 }; |
| 904 | 896 |
| 905 // TODO(jgraettinger): This representation needs review. SpdyContinuationIR | 897 // TODO(jgraettinger): This representation needs review. SpdyContinuationIR |
| 906 // needs to frame a portion of a single, arbitrarily-broken encoded buffer. | 898 // needs to frame a portion of a single, arbitrarily-broken encoded buffer. |
| 907 class NET_EXPORT_PRIVATE SpdyContinuationIR | 899 class NET_EXPORT_PRIVATE SpdyContinuationIR |
| 908 : public SpdyFrameWithNameValueBlockIR { | 900 : public SpdyFrameWithNameValueBlockIR { |
| 909 public: | 901 public: |
| 910 explicit SpdyContinuationIR(SpdyStreamId stream_id) | 902 explicit SpdyContinuationIR(SpdyStreamId stream_id) |
| 911 : SpdyFrameWithNameValueBlockIR(stream_id), | 903 : SpdyFrameWithNameValueBlockIR(stream_id), end_headers_(false) {} |
| 912 end_headers_(false) {} | |
| 913 | 904 |
| 914 virtual void Visit(SpdyFrameVisitor* visitor) const OVERRIDE; | 905 virtual void Visit(SpdyFrameVisitor* visitor) const OVERRIDE; |
| 915 | 906 |
| 916 bool end_headers() const { return end_headers_; } | 907 bool end_headers() const { return end_headers_; } |
| 917 void set_end_headers(bool end_headers) {end_headers_ = end_headers;} | 908 void set_end_headers(bool end_headers) { end_headers_ = end_headers; } |
| 918 | 909 |
| 919 private: | 910 private: |
| 920 bool end_headers_; | 911 bool end_headers_; |
| 921 DISALLOW_COPY_AND_ASSIGN(SpdyContinuationIR); | 912 DISALLOW_COPY_AND_ASSIGN(SpdyContinuationIR); |
| 922 }; | 913 }; |
| 923 | 914 |
| 924 // ------------------------------------------------------------------------- | 915 // ------------------------------------------------------------------------- |
| 925 // Wrapper classes for various SPDY frames. | 916 // Wrapper classes for various SPDY frames. |
| 926 | 917 |
| 927 // All Spdy Frame types derive from this SpdyFrame class. | 918 // All Spdy Frame types derive from this SpdyFrame class. |
| 928 class SpdyFrame { | 919 class SpdyFrame { |
| 929 public: | 920 public: |
| 930 // Create a SpdyFrame using a pre-created buffer. | 921 // Create a SpdyFrame using a pre-created buffer. |
| 931 // If |owns_buffer| is true, this class takes ownership of the buffer | 922 // If |owns_buffer| is true, this class takes ownership of the buffer |
| 932 // and will delete it on cleanup. The buffer must have been created using | 923 // and will delete it on cleanup. The buffer must have been created using |
| 933 // new char[]. | 924 // new char[]. |
| 934 // If |owns_buffer| is false, the caller retains ownership of the buffer and | 925 // If |owns_buffer| is false, the caller retains ownership of the buffer and |
| 935 // is responsible for making sure the buffer outlives this frame. In other | 926 // is responsible for making sure the buffer outlives this frame. In other |
| 936 // words, this class does NOT create a copy of the buffer. | 927 // words, this class does NOT create a copy of the buffer. |
| 937 SpdyFrame(char* data, size_t size, bool owns_buffer) | 928 SpdyFrame(char* data, size_t size, bool owns_buffer) |
| 938 : frame_(data), | 929 : frame_(data), size_(size), owns_buffer_(owns_buffer) { |
| 939 size_(size), | |
| 940 owns_buffer_(owns_buffer) { | |
| 941 DCHECK(frame_); | 930 DCHECK(frame_); |
| 942 } | 931 } |
| 943 | 932 |
| 944 ~SpdyFrame() { | 933 ~SpdyFrame() { |
| 945 if (owns_buffer_) { | 934 if (owns_buffer_) { |
| 946 delete [] frame_; | 935 delete[] frame_; |
| 947 } | 936 } |
| 948 frame_ = NULL; | 937 frame_ = NULL; |
| 949 } | 938 } |
| 950 | 939 |
| 951 // Provides access to the frame bytes, which is a buffer containing | 940 // Provides access to the frame bytes, which is a buffer containing |
| 952 // the frame packed as expected for sending over the wire. | 941 // the frame packed as expected for sending over the wire. |
| 953 char* data() const { return frame_; } | 942 char* data() const { return frame_; } |
| 954 | 943 |
| 955 // Returns the actual size of the underlying buffer. | 944 // Returns the actual size of the underlying buffer. |
| 956 size_t size() const { return size_; } | 945 size_t size() const { return size_; } |
| (...skipping 30 matching lines...) Expand all Loading... |
| 987 SpdyFrameVisitor() {} | 976 SpdyFrameVisitor() {} |
| 988 virtual ~SpdyFrameVisitor() {} | 977 virtual ~SpdyFrameVisitor() {} |
| 989 | 978 |
| 990 private: | 979 private: |
| 991 DISALLOW_COPY_AND_ASSIGN(SpdyFrameVisitor); | 980 DISALLOW_COPY_AND_ASSIGN(SpdyFrameVisitor); |
| 992 }; | 981 }; |
| 993 | 982 |
| 994 } // namespace net | 983 } // namespace net |
| 995 | 984 |
| 996 #endif // NET_SPDY_SPDY_PROTOCOL_H_ | 985 #endif // NET_SPDY_SPDY_PROTOCOL_H_ |
| OLD | NEW |