fix off by one error in resource availability

[finishes #61320078]
allow custom buildpack urls with special characters

previously, these weren't escaped, so the download would fail.
Auto-merge remote-tracking branch 'upstream/master'