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
18
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
4b2723d7
Commit
4b2723d7
authored
4 years ago
by
Dmitriy A. Gerasimov
Browse files
Options
Downloads
Patches
Plain Diff
[+] Some updates for cache
parent
b6321d8a
No related branches found
No related tags found
No related merge requests found
Pipeline
#7211
passed with stage
in 13 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dap-sdk/net/server/http_server/dap_http_cache.c
+10
-0
10 additions, 0 deletions
dap-sdk/net/server/http_server/dap_http_cache.c
modules/service/vpn/include/dap_chain_net_srv_vpn_cdb.h
+3
-0
3 additions, 0 deletions
modules/service/vpn/include/dap_chain_net_srv_vpn_cdb.h
with
13 additions
and
0 deletions
dap-sdk/net/server/http_server/dap_http_cache.c
+
10
−
0
View file @
4b2723d7
...
@@ -36,8 +36,18 @@ dap_http_cache_t * dap_http_cache_update(struct dap_http_url_proc * a_url_proc,
...
@@ -36,8 +36,18 @@ dap_http_cache_t * dap_http_cache_update(struct dap_http_url_proc * a_url_proc,
l_ret
->
body_size
=
a_body_size
;
l_ret
->
body_size
=
a_body_size
;
}
}
l_ret
->
headers
=
dap_http_headers_dup
(
a_headers
);
l_ret
->
headers
=
dap_http_headers_dup
(
a_headers
);
l_ret
->
ts_expire
=
a_ts_expire
;
l_ret
->
ts_expire
=
a_ts_expire
;
l_ret
->
url_proc
=
a_url_proc
;
l_ret
->
url_proc
=
a_url_proc
;
//Here we cut off 'Date' header because we add it new on each cached request
dap_http_header_t
*
l_hdr_date
=
dap_http_header_find
(
l_ret
->
headers
,
"Date"
);
if
(
l_hdr_date
)
dap_http_header_remove
(
&
l_ret
->
headers
,
l_hdr_date
);
// Reset current cache for url_proc and replace with our own
pthread_rwlock_wrlock
(
&
a_url_proc
->
cache_rwlock
);
pthread_rwlock_wrlock
(
&
a_url_proc
->
cache_rwlock
);
dap_http_cache_delete
(
a_url_proc
->
cache
);
dap_http_cache_delete
(
a_url_proc
->
cache
);
a_url_proc
->
cache
=
l_ret
;
a_url_proc
->
cache
=
l_ret
;
...
...
This diff is collapsed.
Click to expand it.
modules/service/vpn/include/dap_chain_net_srv_vpn_cdb.h
+
3
−
0
View file @
4b2723d7
...
@@ -25,9 +25,12 @@
...
@@ -25,9 +25,12 @@
#pragma once
#pragma once
#include
"dap_http.h"
#include
"dap_http.h"
#include
"dap_enc_http.h"
#include
"dap_enc_http.h"
#include
"dap_config.h"
#define DAP_CHAIN_NET_SRV_VPN_CDB_GDB_PREFIX "srv.vpn"
#define DAP_CHAIN_NET_SRV_VPN_CDB_GDB_PREFIX "srv.vpn"
extern
dap_config_t
*
g_dap_config_cdb
;
int
dap_chain_net_srv_vpn_cdb_init
(
dap_http_t
*
a_http
);
int
dap_chain_net_srv_vpn_cdb_init
(
dap_http_t
*
a_http
);
void
dap_chain_net_srv_vpn_cdb_deinit
();
void
dap_chain_net_srv_vpn_cdb_deinit
();
void
dap_chain_net_srv_vpn_cdb_auth_after
(
enc_http_delegate_t
*
a_delegate
,
const
char
*
a_login
,
const
char
*
a_pkey_b64
);
void
dap_chain_net_srv_vpn_cdb_auth_after
(
enc_http_delegate_t
*
a_delegate
,
const
char
*
a_login
,
const
char
*
a_pkey_b64
);
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