feat(lander): remove content-disposition header
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/push/docker Pipeline was successful Details

new-lnm-integration
Jef Roosens 2024-03-02 12:02:20 +01:00
parent e438bd045c
commit dc0a3a7349
Signed by: Jef Roosens
GPG Key ID: B75D4F293C7052DB
2 changed files with 4 additions and 16 deletions

View File

@ -23,6 +23,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Landerctl
* `-c` flag to use custom config file (useful for testing)
## Changed
* Removed Content-Disposition header for files
## [0.2.0](https://git.rustybever.be/Chewing_Bever/lander/src/tag/0.2.0)
### Added

View File

@ -93,22 +93,6 @@ lnm_http_step_err lander_get_file(lnm_http_conn *conn) {
lander_attr_to_header(ctx, lander_attr_type_content_type,
lnm_http_header_content_type);
lsm_str *value;
char *buf;
if (lsm_entry_attr_get(&value, c_ctx->entry, lander_attr_type_file_name) ==
lsm_error_ok) {
buf = malloc(24 + lsm_str_len(value));
int len = lsm_str_len(value);
sprintf(buf, "attachment; filename=\"%.*s\"", len, lsm_str_ptr(value));
} else {
buf = malloc(11);
strcpy(buf, "attachment");
}
lnm_http_res_add_header(&ctx->res, lnm_http_header_content_disposition, buf,
true);
return lnm_http_step_err_done;
}