Skip to content

Commit

Permalink
set mimetype to application/octet-stream
Browse files Browse the repository at this point in the history
  • Loading branch information
jaedm97 committed Jan 19, 2024
1 parent 4e18138 commit 23ae319
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion languages/instawp-connect.pot
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2024-01-18 12:44+0000\n"
"POT-Creation-Date: 2024-01-19 06:20+0000\n"
"X-Poedit-Basepath: ..\n"
"X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
"X-Poedit-SearchPath-0: .\n"
Expand Down
2 changes: 0 additions & 2 deletions serve.php
Original file line number Diff line number Diff line change
Expand Up @@ -490,15 +490,13 @@ function is_valid_file( $filepath ): bool {
$fileId = $row['id'];
$filePath = $row['filepath'];
$file_name = basename( $filePath );
$mimetype = mime_content_type( $filePath );
$relativePath = ltrim( str_replace( WP_ROOT, "", $filePath ), DIRECTORY_SEPARATOR );
$filePath = process_files( $tracking_db, $filePath, $relativePath );

if ( $handle_config_separately && $file_name === 'wp-config.php' ) {
$relativePath = $file_name;
}

// header( 'Content-Type: ' . $mimetype );
header( 'Content-Type: application/octet-stream' );
header( 'x-file-relative-path: ' . $relativePath );
header( 'x-iwp-progress: ' . $progress_percentage );
Expand Down

0 comments on commit 23ae319

Please sign in to comment.