Commit 3c4d7fe5a3ba86018c88dd912f464702088487e8
1 parent
b5f08a36
add to_Content_Disposition function which get a string and transform it to the c…
…orresponding alternative. If the disposition string is not know the default type is inline
Showing
1 changed file
with
11 additions
and
0 deletions
Show diff stats
web/CXM_multihost_http_server.anubis
| ... | ... | @@ -203,6 +203,17 @@ public define String |
| 203 | 203 | } |
| 204 | 204 | . |
| 205 | 205 | |
| 206 | +public define Content_Disposition | |
| 207 | + to_Content_Disposition | |
| 208 | + ( | |
| 209 | + String disposition_string | |
| 210 | + )= | |
| 211 | + if disposition_string = "attachment" then attachment | |
| 212 | + else if disposition_string = "inline" then inline | |
| 213 | + else | |
| 214 | + inline | |
| 215 | +. | |
| 216 | + | |
| 206 | 217 | public type AWP_Handler_Answer: |
| 207 | 218 | printable_tree(Printable_tree p_tree), |
| 208 | 219 | send_file(String full_path, Content_Disposition c_disposition) | ... | ... |