From 93e1bb3c2950c4678e1c0660d504edab93117bad Mon Sep 17 00:00:00 2001 From: Eric Wertz Date: Fri, 30 May 2025 19:47:24 -0400 Subject: [PATCH] more updates to get linux build to work --- backend/HTTPResponse.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/backend/HTTPResponse.cpp b/backend/HTTPResponse.cpp index cc1fe20..b0e9971 100644 --- a/backend/HTTPResponse.cpp +++ b/backend/HTTPResponse.cpp @@ -9,6 +9,10 @@ std::string CHTTPResponse::_wwwDir = ""; +#ifndef PATH_MAX +#define PATH_MAX 4096 +#endif + // Base CHTTPResponse Implementation CHTTPResponse::CHTTPResponse(const CHTTPRequest& request) : _request(request) { @@ -89,5 +93,8 @@ void CHTTPResponse::send() out << responseBody.str(); - write(_request.getSocket(), out.str().c_str(), out.tellp()); + if( write(_request.getSocket(), out.str().c_str(), out.tellp()) == -1 ) + { + die("Failed to write response to socket"); + } } \ No newline at end of file -- 2.49.0