MCPcopy Index your code
hub / github.com/NativeScript/SimDeck / split_http_response

Function split_http_response

packages/server/src/devtools.rs:587–593  ·  view source on GitHub ↗
(response: &[u8])

Source from the content-addressed store, hash-verified

585}
586
587fn split_http_response(response: &[u8]) -> Option<(String, &[u8])> {
588 let separator = response
589 .windows(4)
590 .position(|window| window == b"\r\n\r\n")?;
591 let headers = String::from_utf8_lossy(&response[..separator]).into_owned();
592 Some((headers, &response[separator + 4..]))
593}
594
595fn response_has_complete_body(response: &[u8]) -> bool {
596 let Some((headers, body)) = split_http_response(response) else {

Callers 3

fetch_devtools_jsonFunction · 0.85
fetch_metro_resourceFunction · 0.85

Calls 1

windowsMethod · 0.80

Tested by

no test coverage detected