-
Notifications
You must be signed in to change notification settings - Fork 848
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor net lib functionality and fix build issues
This makes the following changes related to the net lib: - A CMake run now fails in case OpenSSL is not found when the local PostgreSQL installation has been compiled with SSL enabled. The reason why it is best to fail the CMake run in this case is because USE_OPENSSL will be defined and 1 in `pg_config.h` and thus we will compile with SSL support. - Use palloc/pfree in connection library. - Split net library into separate source files. The net library is refactored so that the code for different connection types live in their separate source files. In particular, the source code for mock connections is now moved to `test/src/net`. - The generate_typedefs.sh script now runs in subdirectories so that source files in those subdirectories are properly pgindented. - The pgindent target previously did not cover files under `test/src`. This is now fixed. An exclude file has also been added that avoids running pgindent in hidden directories. This fixes issues with, e.g., trying to indent files in cquery caches. - Fix formatting with pgindent Fix parameter types in HTTP lib. Add `const` to parameter types, such as strings. Use `size_t` for length parameters - Parse and validate the status line of HTTP responses. The beginning of HTTP responses weren't properly parsed and validated, allowing invalid character sequences at the start of requests.
- Loading branch information
1 parent
45a2b76
commit 4f6b92a
Showing
21 changed files
with
657 additions
and
487 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
# Add all *.c to sources in upperlevel directory | ||
set(SOURCES | ||
"${CMAKE_CURRENT_SOURCE_DIR}/conn.c" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/conn_plain.c" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/conn_ssl.c" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/http_request.c" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/http_response.c" | ||
) | ||
|
||
target_sources(${PROJECT_NAME} PRIVATE ${SOURCES}) |
Oops, something went wrong.