Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Nginx Http Shibboleth
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Anna-Maria Tipotsch
Nginx Http Shibboleth
Commits
be12df59
Unverified
Commit
be12df59
authored
2 years ago
by
David Beitey
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #50 from heikojansen/compat_nginx_1-23-0
Fix compatibility with nginx 1.23.0+
parents
74f9c373
99d72dc8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ngx_http_shibboleth_module.c
+47
-0
47 additions, 0 deletions
ngx_http_shibboleth_module.c
with
47 additions
and
0 deletions
ngx_http_shibboleth_module.c
+
47
−
0
View file @
be12df59
...
@@ -9,6 +9,9 @@
...
@@ -9,6 +9,9 @@
* Contains elements adapted from ngx_lua:
* Contains elements adapted from ngx_lua:
* Copyright (C) 2009-2015, by Xiaozhe Wang (chaoslawful) chaoslawful@gmail.com.
* Copyright (C) 2009-2015, by Xiaozhe Wang (chaoslawful) chaoslawful@gmail.com.
* Copyright (C) 2009-2015, by Yichun "agentzh" Zhang (章亦春) agentzh@gmail.com, CloudFlare Inc.
* Copyright (C) 2009-2015, by Yichun "agentzh" Zhang (章亦春) agentzh@gmail.com, CloudFlare Inc.
* Contains elements adapted from ngx_headers_more:
* Copyright (c) 2009-2017, Yichun "agentzh" Zhang (章亦春) agentzh@gmail.com, OpenResty Inc.
* Copyright (c) 2010-2013, Bernd Dorn.
*
*
* Distributed under 2-clause BSD license, see LICENSE file.
* Distributed under 2-clause BSD license, see LICENSE file.
*/
*/
...
@@ -760,6 +763,9 @@ ngx_http_set_header_helper(ngx_http_request_t *r, ngx_http_shib_request_header_v
...
@@ -760,6 +763,9 @@ ngx_http_set_header_helper(ngx_http_request_t *r, ngx_http_shib_request_header_v
h
->
key
=
hv
->
key
;
h
->
key
=
hv
->
key
;
h
->
value
=
*
value
;
h
->
value
=
*
value
;
#if defined(nginx_version) && nginx_version >= 1023000
h
->
next
=
NULL
;
#endif
h
->
lowcase_key
=
ngx_pnalloc
(
r
->
pool
,
h
->
key
.
len
);
h
->
lowcase_key
=
ngx_pnalloc
(
r
->
pool
,
h
->
key
.
len
);
if
(
h
->
lowcase_key
==
NULL
)
{
if
(
h
->
lowcase_key
==
NULL
)
{
...
@@ -840,6 +846,46 @@ static ngx_int_t
...
@@ -840,6 +846,46 @@ static ngx_int_t
ngx_http_set_builtin_multi_header
(
ngx_http_request_t
*
r
,
ngx_http_set_builtin_multi_header
(
ngx_http_request_t
*
r
,
ngx_http_shib_request_header_val_t
*
hv
,
ngx_str_t
*
value
)
ngx_http_shib_request_header_val_t
*
hv
,
ngx_str_t
*
value
)
{
{
#if defined(nginx_version) && nginx_version >= 1023000
ngx_table_elt_t
**
headers
,
*
h
,
*
ho
,
**
ph
;
headers
=
(
ngx_table_elt_t
**
)
((
char
*
)
&
r
->
headers_out
+
hv
->
offset
);
if
(
*
headers
)
{
for
(
h
=
(
*
headers
)
->
next
;
h
;
h
=
h
->
next
)
{
h
->
hash
=
0
;
h
->
value
.
len
=
0
;
}
h
=
*
headers
;
h
->
value
=
*
value
;
if
(
value
->
len
==
0
)
{
h
->
hash
=
0
;
}
else
{
h
->
hash
=
hv
->
hash
;
}
return
NGX_OK
;
}
for
(
ph
=
headers
;
*
ph
;
ph
=
&
(
*
ph
)
->
next
)
{
/* void */
}
ho
=
ngx_list_push
(
&
r
->
headers_out
.
headers
);
if
(
ho
==
NULL
)
{
return
NGX_ERROR
;
}
ho
->
value
=
*
value
;
ho
->
hash
=
hv
->
hash
;
ngx_str_set
(
&
ho
->
key
,
"Cache-Control"
);
ho
->
next
=
NULL
;
*
ph
=
ho
;
return
NGX_OK
;
#else
ngx_array_t
*
pa
;
ngx_array_t
*
pa
;
ngx_table_elt_t
*
ho
,
**
ph
;
ngx_table_elt_t
*
ho
,
**
ph
;
ngx_uint_t
i
;
ngx_uint_t
i
;
...
@@ -898,6 +944,7 @@ ngx_http_set_builtin_multi_header(ngx_http_request_t *r,
...
@@ -898,6 +944,7 @@ ngx_http_set_builtin_multi_header(ngx_http_request_t *r,
*
ph
=
ho
;
*
ph
=
ho
;
return
NGX_OK
;
return
NGX_OK
;
#endif
}
}
...
...
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