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

This commit is contained in:
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

@ -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;
}