docs: @SuppressWarnings("unused")
      final void handleHeaderValue(ByteBuffer buffer, ResponseParseState state, HttpResponseBuilder builder) {
          StringBuilder stringBuilder = state.stringBuilder;
          if (stringBuilder == null) {
              stringBuilder = new StringBuilder();
              state.parseState = 0;
          }
  
          int parseState = state.parseState;
          while (buffer.hasRemaining()) {
              final byte next = buffer.get();
              switch (parseState) {
                  case NORMAL: {
                      if (next == '\r') {
                          parseState = BEGIN_LINE_END;
                      } else if (next == '\n') {
                          parseState = LINE_END;
                      } else if (next == ' ' || next == '\t') {
                          parseState = WHITESPACE;
                      } else {
                          stringBuilder.append((char) next);
                      }
                      break;
                  }
                  case WHITESPACE: {
                      if (next == '\r') {
                          parseState = BEGIN_LINE_END;
                      } else if (next == '\n') {
                          parseState = LINE_END;
                      } else if (next == ' ' || next == '\t') {
                      } else {
                          if (stringBuilder.length() > 0) {
                              stringBuilder.append(' ');
                          }
                          stringBuilder.append((char) next);
                          parseState = NORMAL;
                      }
                      break;
                  }
                  case LINE_END:
                  case BEGIN_LINE_END: {
                      if (next == '\n' && parseState == BEGIN_LINE_END) {
                          parseState = LINE_END;
                      } else if (next == '\t' ||
                              next == ' ') {
                          //this is a continuation
                          parseState = WHITESPACE;
                      } else {
                          //we have a header
                          HttpString nextStandardHeader = state.nextHeader;
                          String headerValue = stringBuilder.toString();
  
                          //TODO: we need to decode this according to RFC-2047 if we have seen a =? symbol
                          builder.getResponseHeaders().add(nextStandardHeader, headerValue);
  
                          state.nextHeader = null;
  
                          state.leftOver = next;
                          state.stringBuilder.setLength(0);
                          if (next == '\r') {
                              parseState = AWAIT_DATA_END;
                          } else {
                              state.state = ResponseParseState.HEADER;
                              state.parseState = 0;
                              return;
                          }
                      }
                      break;
                  }
                  case AWAIT_DATA_END: {
                      state.state = ResponseParseState.PARSE_COMPLETE;
                      return;
                  }
              }
          }
          //we only write to the state if we did not finish parsing
          state.parseState = parseState;
      }