LibHTTP: Report cache reader body sizes
Return the body length stored on CacheEntryReader instead of using the footer field inherited from CacheEntry. Readers do not populate the footer until validation, but RequestServer needs the size before then to choose between pipe transfer and file-backed mapping.
This commit is contained in:
parent
ff3c4db3a4
commit
8ee6e38fd1
1 changed files with 2 additions and 0 deletions
|
|
@ -137,6 +137,8 @@ public:
|
|||
|
||||
ErrorOr<CacheEntryBodyFile> take_body_file();
|
||||
|
||||
u64 body_size() const { return m_data_size; }
|
||||
|
||||
u32 status_code() const { return m_cache_header.status_code; }
|
||||
Optional<String> const& reason_phrase() const { return m_reason_phrase; }
|
||||
HeaderList& response_headers() { return m_response_headers; }
|
||||
|
|
|
|||
Loading…
Reference in a new issue