diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a64beb..1790cc2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/lander/lander_get.c b/src/lander/lander_get.c index f9d085f..aaf35de 100644 --- a/src/lander/lander_get.c +++ b/src/lander/lander_get.c @@ -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; }