File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Userland/Libraries/LibWeb/WebDriver Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -220,7 +220,7 @@ ErrorOr<void, Client::WrappedError> Client::on_ready_to_read()
220
220
break ;
221
221
}
222
222
223
- m_request = HTTP::HttpRequest::from_raw_request (builder.to_byte_buffer ( ));
223
+ m_request = HTTP::HttpRequest::from_raw_request (TRY ( builder.try_to_byte_buffer () ));
224
224
if (!m_request.has_value ())
225
225
return {};
226
226
@@ -278,7 +278,7 @@ ErrorOr<void, Client::WrappedError> Client::send_success_response(JsonValue resu
278
278
builder.appendff (" Content-Length: {}\r\n " , content.length ());
279
279
builder.append (" \r\n " sv);
280
280
281
- auto builder_contents = builder.to_byte_buffer ( );
281
+ auto builder_contents = TRY ( builder.try_to_byte_buffer () );
282
282
TRY (m_socket->write (builder_contents));
283
283
284
284
while (!content.is_empty ()) {
@@ -319,8 +319,8 @@ ErrorOr<void, Client::WrappedError> Client::send_error_response(Error const& err
319
319
header_builder.appendff (" Content-Length: {}\r\n " , content_builder.length ());
320
320
header_builder.append (" \r\n " sv);
321
321
322
- TRY (m_socket->write (header_builder.to_byte_buffer ( )));
323
- TRY (m_socket->write (content_builder.to_byte_buffer ( )));
322
+ TRY (m_socket->write (TRY ( header_builder.try_to_byte_buffer () )));
323
+ TRY (m_socket->write (TRY ( content_builder.try_to_byte_buffer () )));
324
324
325
325
log_response (error.http_status );
326
326
return {};
You can’t perform that action at this time.
0 commit comments