Discussion:
static_file and custom headers
Dr G
2014-05-23 20:27:24 UTC
Permalink
I noticed when using static_file that the static_file function takes over
the header.
is there a way to have static_file include any set_header data when it
send the response?


thanks

G
Iuri
2014-05-23 20:40:17 UTC
Permalink
The static_file function returns a response object. Instead of return it,
take the object and change it the way you want.

response = static_file(...)
response.set_header(...)
return response
Post by Dr G
I noticed when using static_file that the static_file function takes over
the header.
is there a way to have static_file include any set_header data when it
send the response?
thanks
G
--
--
You are member of the "bottlepy" group at google groups.
See http://groups.google.de/group/bottlepy for mailing list options.
See http://bottlepy.org/ for news and documentation.
---
You received this message because you are subscribed to the Google Groups
"bottlepy" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
--
You are member of the "bottlepy" group at google groups.
See http://groups.google.de/group/bottlepy for mailing list options.
See http://bottlepy.org/ for news and documentation.

---
You received this message because you are subscribed to the Google Groups "bottlepy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bottlepy+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Dr G
2014-05-23 20:44:15 UTC
Permalink
ahh nice, thanks for the data!

G
Post by Iuri
The static_file function returns a response object. Instead of return it,
take the object and change it the way you want.
response = static_file(...)
response.set_header(...)
return response
Post by Dr G
I noticed when using static_file that the static_file function takes
over the header.
is there a way to have static_file include any set_header data when it
send the response?
thanks
G
--
--
You are member of the "bottlepy" group at google groups.
See http://groups.google.de/group/bottlepy for mailing list options.
See http://bottlepy.org/ for news and documentation.
---
You received this message because you are subscribed to the Google Groups
"bottlepy" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
--
You are member of the "bottlepy" group at google groups.
See http://groups.google.de/group/bottlepy for mailing list options.
See http://bottlepy.org/ for news and documentation.

---
You received this message because you are subscribed to the Google Groups "bottlepy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bottlepy+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...