temporarily turn off symbol server stuff - switch off spoof for step-over

This commit is contained in:
Ryan Fleury committed 2026-06-09 09:27:23 -07:00
1 parent 132751777f
commit 9955c8c1a7
16 files changed
+159 -76

No files matched your search

+25 -3
View File
@@ -344,12 +344,24 @@ http_async_tick(void)
DWORD status_code = 0;
DWORD status_code_size = sizeof(status_code);
WinHttpQueryHeaders(req->hRequest,
WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER,
WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER,
WINHTTP_HEADER_NAME_BY_INDEX,
&status_code, &status_code_size, WINHTTP_NO_HEADER_INDEX);
req->status_code = status_code;
}
// rjf: figure out total bytes
if(req->total_response_bytes == 0)
{
DWORD buffer_size = sizeof(req->total_response_bytes);
WinHttpQueryHeaders(req->hRequest,
WINHTTP_QUERY_CONTENT_LENGTH|WINHTTP_QUERY_FLAG_NUMBER64,
WINHTTP_HEADER_NAME_BY_INDEX,
&req->total_response_bytes,
&buffer_size,
WINHTTP_NO_HEADER_INDEX);
}
// rjf: join all currently read body contents
String8 body = str8_list_join(scratch.arena, &req->finished_body_pieces, 0);
@@ -359,7 +371,7 @@ http_async_tick(void)
// rjf: compute size per record header
U64 max_record_size = req->out_ring->ring->size;
U64 bytes_per_record_header = sizeof(U64) + sizeof(U64) + sizeof(B32) + sizeof(HTTP_StatusCode);
U64 bytes_per_record_header = sizeof(U64) + sizeof(U64) + sizeof(U64) + sizeof(U64) + sizeof(B32) + sizeof(HTTP_StatusCode);
// rjf: push response records
for(U64 off = 0, next_off = 0; off <= body.size; off = next_off)
@@ -383,6 +395,8 @@ http_async_tick(void)
B32 has_more = !is_last;
str8_list_push(scratch.arena, &pieces, str8_struct(&record_size));
str8_list_push(scratch.arena, &pieces, str8_struct(&req->id));
str8_list_push(scratch.arena, &pieces, str8_struct(&req->total_response_bytes_sent));
str8_list_push(scratch.arena, &pieces, str8_struct(&req->total_response_bytes));
str8_list_push(scratch.arena, &pieces, str8_struct(&has_more));
str8_list_push(scratch.arena, &pieces, str8_struct(&req->status_code));
str8_list_push(scratch.arena, &pieces, str8_substr(body, r1u64(off, next_off)));
@@ -396,12 +410,18 @@ http_async_tick(void)
if(!guarded_ring_write_string_or_wait(&g, record_data, 0))
{
push_failed = 1;
String8 unpushed_body_piece = str8_substr(body, r1u64(off, next_off));
String8 unpushed_body_piece = str8_substr(body, r1u64(off, body.size));
str8_list_push(req->arena, &req->finished_body_pieces, str8_copy(req->arena, unpushed_body_piece));
}
guarded_ring_close(&g);
}
// rjf: advance total bytes sent
if(!push_failed)
{
req->total_response_bytes_sent += (next_off - off);
}
// rjf: cancel on no movement
if(next_off == off || push_failed)
{
@@ -528,6 +548,8 @@ http_pop_response(Arena *arena, GuardedRing *out_ring, HTTP_Response *response_o
guarded_ring_read_or_wait(&g, data.size, data.str, max_U64);
U64 off = 0;
off += str8_deserial_read_struct(data, off, &response_out->id);
off += str8_deserial_read_struct(data, off, &response_out->off);
off += str8_deserial_read_struct(data, off, &response_out->off_opl);
off += str8_deserial_read_struct(data, off, &response_out->has_more);
off += str8_deserial_read_struct(data, off, &response_out->code);
response_out->body.size = (data.size - off);
+2
View File
@@ -35,6 +35,8 @@ struct W32_HTTP_Request
void *optional; // NOTE(rjf): must persist with in-flight requests
U64 optional_size;
HTTP_StatusCode status_code;
U64 total_response_bytes_sent;
U64 total_response_bytes;
U64 arena_start_body_read_pos;
String8List finished_body_pieces;
void *next_body_piece;
@@ -201,7 +201,7 @@ smsv_async_tick(void)
{
str8_list_push(task->arena, &task->file_pieces, str8_copy(task->arena, r.body));
}
if(r.has_more == 0 && task->status != W32_SMSV_TaskStatus_DoneDownloading)
if(!r.has_more && task->status != W32_SMSV_TaskStatus_DoneDownloading)
{
task->status = W32_SMSV_TaskStatus_DoneDownloading;
W32_SMSV_TaskNode *n = push_array(scratch.arena, W32_SMSV_TaskNode, 1);
@@ -329,6 +329,11 @@ smsv_async_tick(void)
}
}
write_data_list_to_file_path(task->local_path, task->file_pieces);
if(task->current_server_url_node != 0)
{
String8 origin_path = str8f(scratch.arena, "%S/origin.txt", str8_chop_last_slash(task->local_path));
write_data_to_file_path(origin_path, task->current_server_url_node->string);
}
}
// rjf: evict task from cache