diff --git a/Release/Linux/OfficeAuditLogCollector b/Release/Linux/OfficeAuditLogCollector index df2685f..e1d3eaa 100644 --- a/Release/Linux/OfficeAuditLogCollector +++ b/Release/Linux/OfficeAuditLogCollector @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9b4d3320c7e109dbe6ed1f380ae16230f6ca8b9b005d815bdb44aeffc0f4e454 -size 7349496 +oid sha256:2d36dc1c760f7ed5c7c846f61826b78f7d740aaec7a7048b2d56749b1ef3c7d1 +size 7349416 diff --git a/Release/Windows/OfficeAuditLogCollector.exe b/Release/Windows/OfficeAuditLogCollector.exe index a6f8c96..2448091 100644 --- a/Release/Windows/OfficeAuditLogCollector.exe +++ b/Release/Windows/OfficeAuditLogCollector.exe @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:69580b148a6b7ee23881a8562998028bdb113c6ec85c19f2cd9911ba7a3da4fc -size 6075904 +oid sha256:e9b0e2c7f4eabfb0b4185ece0cee5400bece88f40f4b602e096f4bd5ae38a751 +size 6064128 diff --git a/src/api_connection.rs b/src/api_connection.rs index bc248b9..45065af 100644 --- a/src/api_connection.rs +++ b/src/api_connection.rs @@ -259,16 +259,33 @@ async fn handle_blob_response( mut blob_error_tx: Sender<(String, String)>, content_type: String, url: String, known_blobs: &HashMap, duplicate: usize) { - handle_blob_response_paging(&resp, blobs_tx, status_tx.clone(), - content_type.clone()).await; - match resp.json::>>().await { - Ok(i) => { - handle_blob_response_content_uris(status_tx, content_tx, content_type, i, known_blobs, - duplicate) - .await; + handle_blob_response_paging(&resp, blobs_tx, status_tx.clone(), content_type.clone()).await; + + match resp.text().await { + Ok(text) => { + match serde_json::from_str::>>(text.as_str()) { + Ok(i) => { + handle_blob_response_content_uris(status_tx, content_tx, content_type, i, known_blobs, + duplicate) + .await; + }, + Err(e) => { + warn!("Error getting blob JSON {}", e); + debug!("Errored blob json content: {}", text); + match blob_error_tx.send((content_type, url)).await { + Err(e) => { + error!("Could not resend failed blob, dropping it: {}", e); + status_tx.send(StatusMessage::ErrorContentBlob).await.unwrap_or_else( + |e| panic!("Could not send status update, channel closed?: {}", e) + ); + }, + _=> (), + } + } + } }, Err(e) => { - warn!("Error getting blob JSON {}", e); + warn!("Error getting blob response text {}", e); match blob_error_tx.send((content_type, url)).await { Err(e) => { error!("Could not resend failed blob, dropping it: {}", e);