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.

56 lines
1.6 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_WRITE_DATA_NEEDED 0x0040
  13. #define HTTPREQ_FLAG_MASK (HTTPREQ_FLAG_RECV_RESPONSE_CALLED | \
  14. HTTPREQ_FLAG_WRITE_DATA_NEEDED)
  15. // class HTTP_HEADER_PARSER
  16. //
  17. // Retrieves HTTP headers from string containing server response headers.
  18. //
  19. class HTTP_HEADER_PARSER : public HTTP_HEADERS
  20. {
  21. public:
  22. HTTP_HEADER_PARSER(
  23. LPSTR lpszHeaders,
  24. DWORD cbHeaders
  25. );
  26. HTTP_HEADER_PARSER()
  27. : HTTP_HEADERS() {}
  28. DWORD
  29. ParseHeaders(
  30. IN LPSTR lpHeaderBase,
  31. IN DWORD dwBufferLength,
  32. IN BOOL fEof,
  33. IN OUT DWORD *lpdwBufferLengthScanned,
  34. OUT LPBOOL pfFoundCompleteLine,
  35. OUT LPBOOL pfFoundEndOfHeaders
  36. );
  37. BOOL
  38. ParseStatusLine(
  39. IN LPSTR lpHeaderBase,
  40. IN DWORD dwBufferLength,
  41. IN BOOL fEof,
  42. IN OUT DWORD *lpdwBufferLengthScanned,
  43. OUT DWORD *lpdwStatusCode,
  44. OUT DWORD *lpdwMajorVersion,
  45. OUT DWORD *lpdwMinorVersion
  46. );
  47. };