| 111 | } |
| 112 | |
| 113 | inline bool ProceedToNextChunk() { |
| 114 | TString len(Slave_->ReadLine()); |
| 115 | |
| 116 | if (len.empty()) { |
| 117 | /* |
| 118 | * skip crlf from previous chunk |
| 119 | */ |
| 120 | |
| 121 | len = Slave_->ReadLine(); |
| 122 | } |
| 123 | |
| 124 | Pending_ = ParseHex(len); |
| 125 | |
| 126 | if (Pending_) { |
| 127 | return true; |
| 128 | } |
| 129 | |
| 130 | if (Trailers_) { |
| 131 | Trailers_->ConstructInPlace(Slave_); |
| 132 | } |
| 133 | LastChunkReaded_ = true; |
| 134 | |
| 135 | return false; |
| 136 | } |
| 137 | |
| 138 | private: |
| 139 | IInputStream* Slave_; |