Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.5 KiB

  1. #define HTTPREQ_STATE_ANYTHING_OK 0x8000 // for debug purposes
  2. #define HTTPREQ_STATE_CLOSE_OK 0x4000
  3. #define HTTPREQ_STATE_ADD_OK 0x2000
  4. #define HTTPREQ_STATE_SEND_OK 0x1000
  5. #define HTTPREQ_STATE_READ_OK 0x0800
  6. #define HTTPREQ_STATE_QUERY_REQUEST_OK 0x0400
  7. #define HTTPREQ_STATE_QUERY_RESPONSE_OK 0x0200
  8. #define HTTPREQ_STATE_REUSE_OK 0x0100
  9. #define HTTPREQ_STATE_WRITE_OK 0x0010
  10. // Compact into bits used for HTTPREQ_STATE_*
  11. #define HTTPREQ_FLAG_RECV_RESPONSE_CALLED 0x0020
  12. #define HTTPREQ_FLAG_MASK (HTTPREQ_FLAG_RECV_RESPONSE_CALLED)
  13. // class HTTP_HEADER_PARSER
  14. //
  15. // Retrieves HTTP headers from string containing server response headers.
  16. //
  17. class HTTP_HEADER_PARSER : public HTTP_HEADERS
  18. {
  19. public:
  20. HTTP_HEADER_PARSER(
  21. LPSTR lpszHeaders,
  22. DWORD cbHeaders
  23. );
  24. HTTP_HEADER_PARSER()
  25. : HTTP_HEADERS() {}
  26. DWORD
  27. ParseHeaders(
  28. IN LPSTR lpHeaderBase,
  29. IN DWORD dwBufferLength,
  30. IN BOOL fEof,
  31. IN OUT DWORD *lpdwBufferLengthScanned,
  32. OUT LPBOOL pfFoundCompleteLine,
  33. OUT LPBOOL pfFoundEndOfHeaders
  34. );
  35. DWORD
  36. ParseStatusLine(
  37. IN LPSTR lpHeaderBase,
  38. IN DWORD dwBufferLength,
  39. IN BOOL fEof,
  40. IN OUT DWORD *lpdwBufferLengthScanned,
  41. OUT BOOL *lpfNeedMoreBuffer,
  42. OUT DWORD *lpdwStatusCode,
  43. OUT DWORD *lpdwMajorVersion,
  44. OUT DWORD *lpdwMinorVersion
  45. );
  46. };