From 490569e0236fbbb2399732346f5bb359ca5a4532 Mon Sep 17 00:00:00 2001 From: Eric Tendian Date: Sun, 12 Nov 2023 00:43:48 -0600 Subject: [PATCH] Fix Rdio Scanner API call to comply with HTTP standards --- .../audio/broadcast/rdioscanner/RdioScannerBroadcaster.java | 1 - .../audio/broadcast/rdioscanner/RdioScannerBuilder.java | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/io/github/dsheirer/audio/broadcast/rdioscanner/RdioScannerBroadcaster.java b/src/main/java/io/github/dsheirer/audio/broadcast/rdioscanner/RdioScannerBroadcaster.java index 1587ddd0f..1af1c2a8c 100644 --- a/src/main/java/io/github/dsheirer/audio/broadcast/rdioscanner/RdioScannerBroadcaster.java +++ b/src/main/java/io/github/dsheirer/audio/broadcast/rdioscanner/RdioScannerBroadcaster.java @@ -270,7 +270,6 @@ private void processRecordingQueue() .uri(URI.create(getBroadcastConfiguration().getHost())) .header(HttpHeaders.CONTENT_TYPE, MULTIPART_FORM_DATA + "; boundary=" + bodyBuilder.getBoundary()) .header(HttpHeaders.USER_AGENT, "sdrtrunk") - .header(HttpHeaders.CONTENT_TYPE, "audio/mpeg") .POST(bodyBuilder.build()) .build(); diff --git a/src/main/java/io/github/dsheirer/audio/broadcast/rdioscanner/RdioScannerBuilder.java b/src/main/java/io/github/dsheirer/audio/broadcast/rdioscanner/RdioScannerBuilder.java index 2906ffb26..896069af8 100644 --- a/src/main/java/io/github/dsheirer/audio/broadcast/rdioscanner/RdioScannerBuilder.java +++ b/src/main/java/io/github/dsheirer/audio/broadcast/rdioscanner/RdioScannerBuilder.java @@ -120,7 +120,7 @@ private String formatFilePart(String boundary) } StringBuilder sb= new StringBuilder(); sb.append(DASH_DASH).append(boundary).append("\r\n"); - sb.append("Content-Disposition: form-data; filename =\"").append(audioName); + sb.append("Content-Disposition: form-data; filename=\"").append(audioName); sb.append("\"; name=\"").append("audio").append("\"\r\n\r\n"); return sb.toString();