| 92 | } |
| 93 | |
| 94 | int |
| 95 | QHttpConnectionPrivate::headerField(http_parser*, const char* at, size_t length) { |
| 96 | if ( ilastRequest == nullptr ) |
| 97 | return 0; |
| 98 | |
| 99 | // insert the header we parsed previously |
| 100 | // into the header map |
| 101 | if ( !itempHeaderField.isEmpty() && !itempHeaderValue.isEmpty() ) { |
| 102 | // header names are always lower-cased |
| 103 | ilastRequest->d_func()->iheaders.insert( |
| 104 | itempHeaderField.toLower(), |
| 105 | itempHeaderValue.toLower() |
| 106 | ); |
| 107 | // clear header value. this sets up a nice |
| 108 | // feedback loop where the next time |
| 109 | // HeaderValue is called, it can simply append |
| 110 | itempHeaderField.clear(); |
| 111 | itempHeaderValue.clear(); |
| 112 | } |
| 113 | |
| 114 | itempHeaderField.append(at, length); |
| 115 | return 0; |
| 116 | } |
| 117 | |
| 118 | int |
| 119 | QHttpConnectionPrivate::headerValue(http_parser*, const char* at, size_t length) { |
nothing calls this directly
no outgoing calls
no test coverage detected