Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARROW-10526: [FlightRPC][C++] Client cookie middleware #8725

Closed
wants to merge 110 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
6c42351
Client cookie middleware
jduo Nov 10, 2020
ee46586
Client cookie middleware with stubs for parsing cookies
jduo Nov 13, 2020
ff76621
Don't expose ClientCookieMiddleware, just the factory.
jduo Nov 13, 2020
1572dc4
Compilation fixes
jduo Nov 13, 2020
6198b6a
Parsing cookie strings
jduo Nov 14, 2020
c1d1308
Fix setting cookie expiration from expires attribute
jduo Nov 14, 2020
fcf5244
Missed Makefile update
jduo Nov 15, 2020
3517c1c
Fix clang-format warnings
jduo Nov 15, 2020
3e715f7
Fix mis-use of make_unique
jduo Nov 15, 2020
100c91f
Fix missing function definitions
jduo Nov 15, 2020
a1523a0
More clang-format issues
jduo Nov 15, 2020
1a792ea
[1] Added testing for cookies
lyndonbauto Nov 20, 2020
249d59e
[1] Fixed some linting issues
lyndonbauto Nov 20, 2020
db9ecc2
[1] Merged master and fixed conflicts.
lyndonbauto Nov 20, 2020
835cd33
[1] Removing custom trim function for arrow trim function
lyndonbauto Nov 20, 2020
7e5fe94
[1] Fixing issue with trim reference.
lyndonbauto Nov 20, 2020
d65e0b6
[1] More linting issue fixes.
lyndonbauto Nov 20, 2020
323df4a
[1] Changing way date is grabbed to support other compilers.
lyndonbauto Nov 20, 2020
af53b26
[1] Fixed linting issues.
lyndonbauto Nov 20, 2020
4bbfe88
[1] Switched to localtime_r because localtime is not liked by the lin…
lyndonbauto Nov 20, 2020
b931774
[1] Trying to fix mingw issue
lyndonbauto Nov 20, 2020
0d975bb
[1] Had windows params backwards.
lyndonbauto Nov 20, 2020
53e96ff
[1] Fixed minor lint issue.
lyndonbauto Nov 23, 2020
91ed697
[1] Testing constant return value.
lyndonbauto Nov 23, 2020
4c2e26d
[1] Added custom parsing for windows abbreviated dates.
lyndonbauto Nov 23, 2020
11b8bce
[1] Custom cookie handling parser.
lyndonbauto Nov 23, 2020
0e7d4af
[1] Added day abbreviation support and fixed month issue.
lyndonbauto Nov 23, 2020
053dc97
[1] Switching to size_t
lyndonbauto Nov 23, 2020
020f503
sizeut fix
lyndonbauto Nov 23, 2020
609ba8a
[1] Testing custom parser in server build.
lyndonbauto Nov 24, 2020
08c6b55
[1] Attempting to fix issue with conflicting types.
lyndonbauto Nov 24, 2020
150fbab
[1] Trying different month lookup.
lyndonbauto Nov 24, 2020
72893e7
[1] Putting some debug info in to try to figure out this failure.
lyndonbauto Nov 24, 2020
5c930eb
[1] Fixed compiler bug and swapped to int64_t
lyndonbauto Nov 24, 2020
2e1a4ee
[1] Adding extra debug info
lyndonbauto Nov 24, 2020
aad4029
[1] Added extra debug info for expiring cookies.
lyndonbauto Nov 24, 2020
3e38671
[1] Added some additional debug info, added constant casting since th…
lyndonbauto Nov 24, 2020
12c702e
[1] Corrected minor lint issue.
lyndonbauto Nov 24, 2020
e26ebf8
[1] Minor nit changes.
lyndonbauto Nov 24, 2020
133753f
[1] Reverting some extra changes that are not required.
lyndonbauto Nov 24, 2020
027ba49
[1] Fixed some naming issues
lyndonbauto Nov 24, 2020
3a2f4da
[1] Reverting submodule
lyndonbauto Nov 25, 2020
cc48d64
[1] Cleaning up includes
lyndonbauto Nov 25, 2020
614eb74
[1] Fixing int64_t conversion issue that pops up on some builds.
lyndonbauto Nov 25, 2020
354b6c7
[1] Checking if arrow parser works for Windows.
lyndonbauto Nov 25, 2020
182ff87
[1] Fixed type casting warning generated so windows can be tested.
lyndonbauto Nov 25, 2020
d64b57c
[1] Added some debug prints to investigate where mingw is going becau…
lyndonbauto Nov 25, 2020
cae3833
Client cookie middleware
jduo Nov 10, 2020
ca76c8b
Client cookie middleware with stubs for parsing cookies
jduo Nov 13, 2020
aa162a1
Don't expose ClientCookieMiddleware, just the factory.
jduo Nov 13, 2020
45fd30e
Compilation fixes
jduo Nov 13, 2020
688cb27
Parsing cookie strings
jduo Nov 14, 2020
3c04b1a
Fix setting cookie expiration from expires attribute
jduo Nov 14, 2020
4ec7481
Missed Makefile update
jduo Nov 15, 2020
ce59606
Fix clang-format warnings
jduo Nov 15, 2020
16e8ce2
Fix mis-use of make_unique
jduo Nov 15, 2020
1c0894a
Fix missing function definitions
jduo Nov 15, 2020
c4b8565
More clang-format issues
jduo Nov 15, 2020
b3a5e3d
[1] Added testing for cookies
lyndonbauto Nov 20, 2020
9f94855
[1] Fixed some linting issues
lyndonbauto Nov 20, 2020
897a4cb
[1] Removing custom trim function for arrow trim function
lyndonbauto Nov 20, 2020
1f46131
[1] Fixing issue with trim reference.
lyndonbauto Nov 20, 2020
3903604
[1] More linting issue fixes.
lyndonbauto Nov 20, 2020
384bd75
[1] Changing way date is grabbed to support other compilers.
lyndonbauto Nov 20, 2020
6c24e9f
[1] Fixed linting issues.
lyndonbauto Nov 20, 2020
036d9b9
[1] Switched to localtime_r because localtime is not liked by the lin…
lyndonbauto Nov 20, 2020
d8cbac4
[1] Trying to fix mingw issue
lyndonbauto Nov 20, 2020
234ccab
[1] Had windows params backwards.
lyndonbauto Nov 20, 2020
8e5297f
[1] Fixed minor lint issue.
lyndonbauto Nov 23, 2020
4efd625
[1] Testing constant return value.
lyndonbauto Nov 23, 2020
4a98988
[1] Added custom parsing for windows abbreviated dates.
lyndonbauto Nov 23, 2020
f9890f9
[1] Custom cookie handling parser.
lyndonbauto Nov 23, 2020
4919d0b
[1] Added day abbreviation support and fixed month issue.
lyndonbauto Nov 23, 2020
cba2c1f
[1] Switching to size_t
lyndonbauto Nov 23, 2020
dd710d6
sizeut fix
lyndonbauto Nov 23, 2020
b2de9a7
[1] Testing custom parser in server build.
lyndonbauto Nov 24, 2020
921e4a0
[1] Attempting to fix issue with conflicting types.
lyndonbauto Nov 24, 2020
450235c
[1] Trying different month lookup.
lyndonbauto Nov 24, 2020
3b2d5cf
[1] Putting some debug info in to try to figure out this failure.
lyndonbauto Nov 24, 2020
3cfde7c
[1] Fixed compiler bug and swapped to int64_t
lyndonbauto Nov 24, 2020
8638423
[1] Adding extra debug info
lyndonbauto Nov 24, 2020
8c0a127
[1] Added extra debug info for expiring cookies.
lyndonbauto Nov 24, 2020
91fd24b
[1] Added some additional debug info, added constant casting since th…
lyndonbauto Nov 24, 2020
ab23bb2
[1] Corrected minor lint issue.
lyndonbauto Nov 24, 2020
61b50d4
[1] Minor nit changes.
lyndonbauto Nov 24, 2020
f931da1
[1] Reverting some extra changes that are not required.
lyndonbauto Nov 24, 2020
5e164ba
[1] Cleaning up includes
lyndonbauto Nov 25, 2020
c0ed058
[1] Fixing int64_t conversion issue that pops up on some builds.
lyndonbauto Nov 25, 2020
353b040
[1] Checking if arrow parser works for Windows.
lyndonbauto Nov 25, 2020
a57e08c
[1] Fixed type casting warning generated so windows can be tested.
lyndonbauto Nov 25, 2020
58fbf80
[1] Added some debug prints to investigate where mingw is going becau…
lyndonbauto Nov 25, 2020
4dcdf18
Merge branch 'lyndon/cpp-cookie-support' of https://github.com/jduo/a…
lyndonbauto Nov 25, 2020
c2cc80e
Merge branch 'master' into lyndon/cpp-cookie-support
lyndonbauto Nov 25, 2020
420d392
[1] Addressing pull request comments.
lyndonbauto Nov 25, 2020
2f31a9e
[1] Added debug info and fixed function definition comments.
lyndonbauto Nov 26, 2020
177d4be
Forgot to remove GMT from string.
lyndonbauto Nov 26, 2020
49d5fcc
[1] Adding debug info to strptime.c
lyndonbauto Nov 26, 2020
cd66ef6
[1] Debugging result struct values since it seems to parse without a …
lyndonbauto Nov 26, 2020
054aecc
[1] fixing typo
lyndonbauto Nov 26, 2020
bee213f
[1] Reverting debug messages with fix for parsing issue
lyndonbauto Nov 26, 2020
df16ee4
[1] Removing changes to file for debugging
lyndonbauto Nov 26, 2020
7d04473
[1] Removing accidentally appended spaces
lyndonbauto Nov 26, 2020
5e16172
[1] Trying date before 32 bit rollover.
lyndonbauto Nov 26, 2020
e30b27f
[1] removing printouts
lyndonbauto Nov 26, 2020
20671c5
[1] Removed extra spaces causing linting failure.
lyndonbauto Nov 26, 2020
e86bae2
[1] Removed IOStream
lyndonbauto Nov 26, 2020
beff155
[1] Moved all parsing functions to internal header
lyndonbauto Nov 27, 2020
7a15b34
[1] Exported classes - got linker issue on some platforms since these…
lyndonbauto Nov 27, 2020
a36bb49
[1] Fixing \param comment.
lyndonbauto Nov 28, 2020
782ec7b
[1] Updates for code review.
lyndonbauto Nov 30, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[1] removing printouts
lyndonbauto committed Nov 26, 2020
commit e30b27f29e5d7e1668e6889e3c966e89eee7606b
6 changes: 0 additions & 6 deletions cpp/src/arrow/flight/client_cookie_middleware.cc
Original file line number Diff line number Diff line change
@@ -193,16 +193,10 @@ struct Cookie {
if (arrow::internal::ParseTimestampStrptime(
cookie_attr_value_str.c_str(), cookie_attr_value_str.size(),
COOKIE_EXPIRES_FORMAT, false, true, arrow::TimeUnit::SECOND, &seconds)) {
std::cout << "seconds " << seconds << std::endl;
cookie.expiration_time_ = std::chrono::time_point<std::chrono::system_clock>(
std::chrono::seconds(seconds));
std::cout << "Expiration time - ";
std::cout << cookie.expiration_time_.time_since_epoch().count() << std::endl;
std::cout << "Now - ";
std::cout << std::chrono::system_clock::now().time_since_epoch().count() << std::endl;
} else {
// Force expiration.
std::cout << "Failed" << std::endl;
cookie.expiration_time_ = std::chrono::system_clock::now();
}
}
3 changes: 0 additions & 3 deletions cpp/src/arrow/util/value_parsing.h
Original file line number Diff line number Diff line change
@@ -23,7 +23,6 @@
#include <chrono>
#include <cstddef>
#include <cstdint>
#include <iostream>
#include <limits>
#include <memory>
#include <string>
@@ -615,11 +614,9 @@ static inline bool ParseTimestampStrptime(const char* buf, size_t length,
char* ret = strptime(clean_copy.c_str(), format, &result);
#endif
if (ret == NULLPTR) {
std::cout << "NULLPTR" << std::endl;
return false;
}
if (!allow_trailing_chars && static_cast<size_t>(ret - clean_copy.c_str()) != length) {
std::cout << "!NULLPTR" << std::endl;
return false;
}
// ignore the time part
2 changes: 1 addition & 1 deletion cpp/src/arrow/vendored/musl/strptime.c
Original file line number Diff line number Diff line change
@@ -234,4 +234,4 @@ char *strptime(const char *__restrict s, const char *__restrict f, struct tm *__
else if (tm->tm_year <= 68) tm->tm_year += 100;
}
return (char *)s;
}
}