Skip to content

Commit

Permalink
ok-1
Browse files Browse the repository at this point in the history
  • Loading branch information
aigem committed Sep 12, 2024
1 parent ea3aacd commit f4e2779
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 5 additions & 5 deletions output.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ def export_files(files, output_file):
# "tsconfig.json",
"src/utils/templates.ts",
# "package.json",
"src/index.ts",
"src/types.ts",
# "src/index.ts",
# "src/types.ts",
"src/handlers/requestHandler.ts",
"src/handlers/webdavHandler.ts",
"src/utils/auth.ts",
"src/utils/cors.ts",
"src/utils/logger.ts",
# "src/utils/auth.ts",
# "src/utils/cors.ts",
# "src/utils/logger.ts",
"src/utils/webdavUtils.ts"
]

Expand Down
4 changes: 3 additions & 1 deletion src/handlers/webdavHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ async function handlePropfind(request: Request, bucket: R2Bucket, bucketName: st
}

const xml = generatePropfindResponse(bucketName, resource_path, props);
logger.info("Generated XML for PROPFIND:", xml); // Add this line for logging
return new Response(xml, {
status: 207,
headers: { "Content-Type": "application/xml; charset=utf-8" }
Expand All @@ -224,11 +225,12 @@ async function handlePropfind(request: Request, bucket: R2Bucket, bucketName: st
logger.error("Error in PROPFIND:", error);
return new Response(generateErrorHTML("Error in PROPFIND", error.message), {
status: 500,
headers: { "Content-Type": "text/html; charset=utf-8" }
headers: { "Content-Type": "application/xml; charset=utf-8" }
});
}
}


async function handleCopy(request: Request, bucket: R2Bucket): Promise<Response> {
const sourcePath = make_resource_path(request);
const destinationHeader = request.headers.get("Destination");
Expand Down

0 comments on commit f4e2779

Please sign in to comment.