Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elphel-apps-imgsrv
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
elphel-apps-imgsrv
Commits
94b1c039
Commit
94b1c039
authored
Aug 02, 2017
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ACEH: Content-Disposition
parent
33d97101
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
imgsrv.c
src/imgsrv.c
+8
-0
No files found.
src/imgsrv.c
View file @
94b1c039
...
@@ -556,6 +556,7 @@ int metaXML(struct file_set *fset, int mode)
...
@@ -556,6 +556,7 @@ int metaXML(struct file_set *fset, int mode)
printf
(
"HTTP/1.0 200 OK
\r\n
"
);
printf
(
"HTTP/1.0 200 OK
\r\n
"
);
printf
(
"Server: Elphel Imgsrv
\r\n
"
);
printf
(
"Server: Elphel Imgsrv
\r\n
"
);
printf
(
"Access-Control-Allow-Origin: *
\r\n
"
);
printf
(
"Access-Control-Allow-Origin: *
\r\n
"
);
printf
(
"Access-Control-Expose-Headers: Content-Disposition
\r\n
"
);
printf
(
"Content-Type: text/xml
\r\n
"
);
printf
(
"Content-Type: text/xml
\r\n
"
);
printf
(
"Pragma: no-cache
\r\n
"
);
printf
(
"Pragma: no-cache
\r\n
"
);
printf
(
"
\r\n
"
);
printf
(
"
\r\n
"
);
...
@@ -833,6 +834,7 @@ int framePointersXML(struct file_set *fset)
...
@@ -833,6 +834,7 @@ int framePointersXML(struct file_set *fset)
printf
(
"HTTP/1.0 200 OK
\r\n
"
);
printf
(
"HTTP/1.0 200 OK
\r\n
"
);
printf
(
"Server: Elphel Imgsrv
\r\n
"
);
printf
(
"Server: Elphel Imgsrv
\r\n
"
);
printf
(
"Access-Control-Allow-Origin: *
\r\n
"
);
printf
(
"Access-Control-Allow-Origin: *
\r\n
"
);
printf
(
"Access-Control-Expose-Headers: Content-Disposition
\r\n
"
);
printf
(
"Content-Length: %d
\r\n
"
,
strlen
(
s
));
printf
(
"Content-Length: %d
\r\n
"
,
strlen
(
s
));
printf
(
"Content-Type: text/xml
\r\n
"
);
printf
(
"Content-Type: text/xml
\r\n
"
);
printf
(
"Pragma: no-cache
\r\n
"
);
printf
(
"Pragma: no-cache
\r\n
"
);
...
@@ -855,6 +857,7 @@ int out1x1gif(void)
...
@@ -855,6 +857,7 @@ int out1x1gif(void)
char
s
[]
=
"HTTP/1.0 200 OK
\r\n
"
\
char
s
[]
=
"HTTP/1.0 200 OK
\r\n
"
\
"Server: Elphel Imgsrv
\r\n
"
\
"Server: Elphel Imgsrv
\r\n
"
\
"Access-Control-Allow-Origin: *
\r\n
"
\
"Access-Control-Allow-Origin: *
\r\n
"
\
"Access-Control-Expose-Headers: Content-Disposition
\r\n
"
\
"Content-Length: 35
\r\n
"
\
"Content-Length: 35
\r\n
"
\
"Content-Type: image/gif
\r\n
"
\
"Content-Type: image/gif
\r\n
"
\
"
\r\n
"
\
"
\r\n
"
\
...
@@ -883,6 +886,7 @@ void errorMsgXML(char * msg)
...
@@ -883,6 +886,7 @@ void errorMsgXML(char * msg)
printf
(
"HTTP/1.0 200 OK
\r\n
"
);
printf
(
"HTTP/1.0 200 OK
\r\n
"
);
printf
(
"Server: Elphel Imgsrv
\r\n
"
);
printf
(
"Server: Elphel Imgsrv
\r\n
"
);
printf
(
"Access-Control-Allow-Origin: *
\r\n
"
);
printf
(
"Access-Control-Allow-Origin: *
\r\n
"
);
printf
(
"Access-Control-Expose-Headers: Content-Disposition
\r\n
"
);
printf
(
"Content-Length: %d
\r\n
"
,
strlen
(
s
));
printf
(
"Content-Length: %d
\r\n
"
,
strlen
(
s
));
printf
(
"Content-Type: text/xml
\r\n
"
);
printf
(
"Content-Type: text/xml
\r\n
"
);
printf
(
"Pragma: no-cache
\r\n
"
);
printf
(
"Pragma: no-cache
\r\n
"
);
...
@@ -1216,6 +1220,7 @@ void listener_loop(struct file_set *fset)
...
@@ -1216,6 +1220,7 @@ void listener_loop(struct file_set *fset)
printf
(
"HTTP/1.0 200 OK
\r\n
"
);
printf
(
"HTTP/1.0 200 OK
\r\n
"
);
printf
(
"Server: Elphel Imgsrv
\r\n
"
);
printf
(
"Server: Elphel Imgsrv
\r\n
"
);
printf
(
"Access-Control-Allow-Origin: *
\r\n
"
);
printf
(
"Access-Control-Allow-Origin: *
\r\n
"
);
printf
(
"Access-Control-Expose-Headers: Content-Disposition
\r\n
"
);
printf
(
"Content-Length: %d
\r\n
"
,
strlen
(
url_args
));
printf
(
"Content-Length: %d
\r\n
"
,
strlen
(
url_args
));
printf
(
"Content-Type: text/plain
\r\n
"
);
printf
(
"Content-Type: text/plain
\r\n
"
);
printf
(
"
\r\n
"
);
printf
(
"
\r\n
"
);
...
@@ -1229,6 +1234,7 @@ void listener_loop(struct file_set *fset)
...
@@ -1229,6 +1234,7 @@ void listener_loop(struct file_set *fset)
printf
(
"HTTP/1.0 200 OK
\r\n
"
);
printf
(
"HTTP/1.0 200 OK
\r\n
"
);
printf
(
"Server: Elphel Imgsrv
\r\n
"
);
printf
(
"Server: Elphel Imgsrv
\r\n
"
);
printf
(
"Access-Control-Allow-Origin: *
\r\n
"
);
printf
(
"Access-Control-Allow-Origin: *
\r\n
"
);
printf
(
"Access-Control-Expose-Headers: Content-Disposition
\r\n
"
);
printf
(
"Content-Length: 11
\r\n
"
);
printf
(
"Content-Length: 11
\r\n
"
);
printf
(
"Content-Type: text/plain
\r\n
"
);
printf
(
"Content-Type: text/plain
\r\n
"
);
printf
(
"
\r\n
"
);
printf
(
"
\r\n
"
);
...
@@ -1285,6 +1291,7 @@ void listener_loop(struct file_set *fset)
...
@@ -1285,6 +1291,7 @@ void listener_loop(struct file_set *fset)
printf
(
"HTTP/1.0 200 OK
\r\n
"
);
printf
(
"HTTP/1.0 200 OK
\r\n
"
);
printf
(
"Server: Elphel Imgsrv
\r\n
"
);
printf
(
"Server: Elphel Imgsrv
\r\n
"
);
printf
(
"Access-Control-Allow-Origin: *
\r\n
"
);
printf
(
"Access-Control-Allow-Origin: *
\r\n
"
);
printf
(
"Access-Control-Expose-Headers: Content-Disposition
\r\n
"
);
printf
(
"Expires: 0
\r\n
"
);
printf
(
"Expires: 0
\r\n
"
);
printf
(
"Pragma: no-cache
\r\n
"
);
printf
(
"Pragma: no-cache
\r\n
"
);
buf_images
=
((
strcmp
(
cp1
,
"img"
)
==
0
)
||
(
strcmp
(
cp1
,
"simg"
)
==
0
))
?
0
:
1
;
buf_images
=
((
strcmp
(
cp1
,
"img"
)
==
0
)
||
(
strcmp
(
cp1
,
"simg"
)
==
0
))
?
0
:
1
;
...
@@ -1316,6 +1323,7 @@ void listener_loop(struct file_set *fset)
...
@@ -1316,6 +1323,7 @@ void listener_loop(struct file_set *fset)
printf
(
"HTTP/1.0 200 OK
\r\n
"
);
printf
(
"HTTP/1.0 200 OK
\r\n
"
);
printf
(
"Server: Elphel Imgsrv
\r\n
"
);
printf
(
"Server: Elphel Imgsrv
\r\n
"
);
printf
(
"Access-Control-Allow-Origin: *
\r\n
"
);
printf
(
"Access-Control-Allow-Origin: *
\r\n
"
);
printf
(
"Access-Control-Expose-Headers: Content-Disposition
\r\n
"
);
printf
(
"Expires: 0
\r\n
"
);
printf
(
"Expires: 0
\r\n
"
);
printf
(
"Pragma: no-cache
\r\n
"
);
printf
(
"Pragma: no-cache
\r\n
"
);
printf
(
"Content-Type: multipart/x-mixed-replace;boundary=ElphelMultipartJPEGBoundary
\r\n
"
);
printf
(
"Content-Type: multipart/x-mixed-replace;boundary=ElphelMultipartJPEGBoundary
\r\n
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment