I'm trying the following ColdFusion code in order for our server to periodically download a zip archive of our repo for an executive backup request. Here's the basic code so far (an amalgam based on a lot of StackOverflow solutions I've found):
<cfset user = urlEncodedFormat("[my username]") />
<cfset pass = urlEncodedFormat("[redacted]") />
<cfhttp method="get"
url="https://bitbucket.org/[project]/[repo]/get/[branch].zip"
username="#user#"
password="#pass#"
path="#detinationPath#/"
file="repo.zip"
getasbinary="auto"
timeout="90"
/>After about 10 seconds, the server records the following response:
Header HTTP/1.1 400 Bad Request Server: nginx Content-Type: text/html Strict-Transport-Security: max-age=31536000; includeSubDomains; preload Date: Tue, 01 Oct 2019 02:26:47 GMT Connection: close Content-Length: 163
Mimetype text/html
Responseheader
Connection close
Content-Length 163
Content-Type text/html
Date Tue, 01 Oct 2019 02:26:47 GMT
Explanation Bad Request
Http_Version HTTP/1.1
Server nginx
Status_Code 400
Strict-Transport-Security max-age=31536000; includeSubDomains; preload
Statuscode 400 Bad Request
The contents of the downloaded "repo.zip" file is the following:
<html>
<head>
<title>Bad Request</title>
</head>
<body>
<h1><p>Bad Request</p></h1>
Request Line is too large (4233 > 4094)
</body>
</html>
I've tried changing the url attribute so it begins with "https://#user#:#pass#@bitbucket.org" and there's no result until a security block is applied.
The CFML server is not running a Git daemon, and is hosted in a HIPAA compliant location.
Are all of these StackOverflow solutions out of date? Is there a basic problem or misunderstanding with this code, or another solution I can use - which does not involve a large installation for such a simple task?