Skip to content

Commit 974d556

Browse files
committed
Refactor multipart request handling and logging
1 parent 6f11deb commit 974d556

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apiintegrations/jamfpro/jamfpro_api_headers.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ func (j *JamfAPIHandler) GetContentTypeHeader(endpoint string, log logger.Logger
3232

3333
// Special case for package upload endpoint
3434
if strings.HasPrefix(endpoint, "/api/v1/packages") && strings.HasSuffix(endpoint, "/upload") {
35-
j.Logger.Debug("Content-Type for package upload endpoint defaulting to multipart/form-data", zap.String("endpoint", endpoint))
36-
return "multipart/form-data"
35+
j.Logger.Debug("Skipping Content-Type setting for package upload endpoint. Multipart request will set", zap.String("endpoint", endpoint))
36+
return "" // Skip setting Content-Type here
3737
}
3838

3939
// If no specific configuration is found, then check for standard URL patterns.

0 commit comments

Comments
 (0)