Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cellframe-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
16
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cellframe
cellframe-sdk
Commits
431d1ced
Commit
431d1ced
authored
4 years ago
by
Dmitriy A. Gerasimov
Browse files
Options
Downloads
Patches
Plain Diff
[*] Fixed GET requests for dap_client_http
parent
292c8f83
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dap-sdk/net/client/dap_client_http.c
+5
-3
5 additions, 3 deletions
dap-sdk/net/client/dap_client_http.c
dap-sdk/net/client/include/dap_client_http.h
+1
-0
1 addition, 0 deletions
dap-sdk/net/client/include/dap_client_http.h
with
6 additions
and
3 deletions
dap-sdk/net/client/dap_client_http.c
+
5
−
3
View file @
431d1ced
...
...
@@ -44,6 +44,7 @@ typedef struct dap_http_client_internal {
dap_client_http_callback_data_t
response_callback
;
dap_client_http_callback_error_t
error_callback
;
dap_client_http_callback_error_ext_t
error_ext_callback
;
void
*
obj
;
// dap_client_pvt_t *client_pvt;
byte_t
*
request
;
...
...
@@ -535,7 +536,8 @@ static void s_http_connected(dap_events_socket_t * a_esocket)
?
dap_snprintf
(
l_request_headers
+
l_offset
,
l_offset2
-=
l_offset
,
"Cookie: %s
\r\n
"
,
l_http_pvt
->
cookie
)
:
0
;
l_offset
=
l_http_pvt
->
request
?
dap_snprintf
(
l_get_str
,
sizeof
(
l_get_str
),
"?%s"
,
l_http_pvt
->
request
)
:
0
;
if
((
l_http_pvt
->
request_size
&&
l_http_pvt
->
request_size
))
dap_snprintf
(
l_get_str
,
sizeof
(
l_get_str
),
"?%s"
,
l_http_pvt
->
request
)
;
}
// send header
...
...
@@ -543,9 +545,9 @@ static void s_http_connected(dap_events_socket_t * a_esocket)
"Host: %s
\r\n
"
"%s"
"
\r\n
"
,
l_http_pvt
->
method
,
l_http_pvt
->
path
,
strlen
(
l_get_str
)
?
l_get_str
:
""
,
l_http_pvt
->
uplink_addr
,
l_request_headers
);
l_http_pvt
->
method
,
l_http_pvt
->
path
,
l_get_str
,
l_http_pvt
->
uplink_addr
,
l_request_headers
);
// send data for POST request
if
(
l_http_pvt
->
request_size
)
{
if
(
l_http_pvt
->
request_size
&&
l_http_pvt
->
request_size
)
{
dap_events_socket_write_unsafe
(
a_esocket
,
l_http_pvt
->
request
,
l_http_pvt
->
request_size
);
}
}
...
...
This diff is collapsed.
Click to expand it.
dap-sdk/net/client/include/dap_client_http.h
+
1
−
0
View file @
431d1ced
...
...
@@ -29,6 +29,7 @@ extern "C" {
#endif
typedef
void
(
*
dap_client_http_callback_error_t
)(
int
,
void
*
);
// Callback for specific http client operations
typedef
void
(
*
dap_client_http_callback_error_ext_t
)(
int
,
int
,
void
*
,
size_t
,
void
*
);
// Callback with extended error processing
typedef
void
(
*
dap_client_http_callback_data_t
)(
void
*
,
size_t
,
void
*
);
// Callback for specific http client operations
void
*
dap_client_http_request_custom
(
dap_worker_t
*
a_worker
,
const
char
*
a_uplink_addr
,
uint16_t
a_uplink_port
,
const
char
*
a_method
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment