Claude/fix https san extension h py pq#23
Closed
NerdsCorp wants to merge 5 commits into
Closed
Conversation
Adds SAN extension with localhost DNS name and IPv4/IPv6 loopback addresses to self-signed certificates generated by the server. This resolves the browser warning about missing subjectAlternativeName extension.
Resolves the 400 Bad Request error when uploading large files (>30MB) to the editor updates endpoint. The issue was caused by ASP.NET Core's default 30MB request body size limit. Changes: - Added [RequestSizeLimit(524_288_000)] attribute to upload endpoints - Added [RequestFormLimits(MultipartBodyLengthLimit = 524_288_000)] attribute - Configured global FormOptions with increased limits for multipart uploads - Set MultipartBodyLengthLimit to 500MB to accommodate large game asset uploads This allows the editor to successfully upload client update packages without hitting request size validation errors.
This is the critical missing piece - Kestrel itself has a 30MB default MaxRequestBodySize limit that was blocking the 47MB uploads even though we configured ASP.NET Core's FormOptions. Added MaxRequestBodySize: 524288000 (500MB) to: - appsettings.json (base configuration) - appsettings.Production.json (production environment - currently active) - appsettings.Development.json (development environment) This completes the three-layer fix for large file uploads: 1. Kestrel MaxRequestBodySize (was 30MB, now 500MB) 2. ASP.NET FormOptions limits (configured in ApiService.cs) 3. Controller-level attributes (configured in EditorUpdatesController.cs)
Added Kestrel timeout configurations to prevent connection drops during large file uploads: - KeepAliveTimeout: 10 minutes (default: 2 minutes) - RequestHeadersTimeout: 10 minutes (default: 30 seconds) - MinRequestBodyDataRate: 100 bytes/second with 10 minute grace period (default: 240 bytes/second with 5 second grace period) The "error while copying content to stream" error indicates the connection was being closed mid-upload, likely due to Kestrel's strict data rate enforcement. A 47MB upload on a slower connection could take several minutes and trigger the default timeout. These relaxed limits allow for: - Slow network connections - Large file uploads (up to 500MB) - Sufficient time to complete multi-file uploads
Adds a robust chunked upload system to handle multi-GB game files with
resume capability. Files larger than 10MB are automatically uploaded in
10MB chunks to avoid HTTP request size limitations and timeout issues.
Server Changes (ChunkedUploadController):
- POST /api/v1/editor/chunked-upload/init - Initialize upload session
- POST /api/v1/editor/chunked-upload/chunk - Upload individual chunks
- GET /api/v1/editor/chunked-upload/status/{sessionId} - Check upload status
- POST /api/v1/editor/chunked-upload/finalize - Assemble chunks into final file
- DELETE /api/v1/editor/chunked-upload/{sessionId} - Cancel upload session
Features:
- Unlimited file size support (multi-GB files)
- Automatic retry with exponential backoff per chunk
- Resume capability by tracking uploaded chunks
- Progress tracking per chunk
- Temporary storage with automatic cleanup
- Security: path validation to prevent directory traversal
- Integrated with existing Developer policy authorization
Client Changes (FrmUploadToServer):
- Automatic detection: files >10MB use chunked upload, smaller files use simple upload
- 10MB chunk size for optimal balance of speed and reliability
- Detailed progress feedback during chunk uploads
- Per-chunk retry logic with exponential backoff
- Graceful fallback to simple upload for small files
Benefits:
- No more 500MB request size limit
- No more timeout issues on slow connections
- Reliable uploads with automatic retry
- Better progress feedback for users
- Resume capability if connection drops
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.