cloudfoundry / ibm-websphere-liberty-buildpack

IBM WebSphere Application Server Liberty Buildpack
Apache License 2.0
72 stars 190 forks source link

mismatched url from cache once '&' is included #407

Closed pivotal-bin-ju closed 5 years ago

pivotal-bin-ju commented 5 years ago

When compiling the application user is trying to push to cloud foundry, at this time the cache may be very helpful for offline platforms. Unluckily once the cached resource includes '&' as the file name, it can be hit due to the mismatched cache encoding name. e.g.: http://www14.software.ibm.com/cgi-bin/weblap/lap.pl?la_formnum=&li_formnum=L-SMKR-AVSEUH&title=IBM%AE+SDK%2C+Java%99+Technology+Edition%2C+Version+8.0&l=en

The solutions would look like below:

+++ b/resources/download_buildpack_cache.rb
@@ -152,7 +152,7 @@ class BuildpackCache
   #
   # @param [String] uri location of the remote resource
   def filename(uri)
-    "#{URI.escape(uri, ':/')}.cached"
+    "#{URI.escape(uri, ':/&')}.cached" 
   end

could you help to review? or you want me to submit the code and send out a pull request?

jgawor commented 5 years ago

@pivotal-bin-ju That looks ok. Can you please submit a pull request with this change?

jgawor commented 5 years ago

@pivotal-bin-ju never mind. included this change as part of #408.

jgawor commented 5 years ago

Fixed in #408

pivotal-bin-ju commented 5 years ago

thanks a lot, Jarek!

On Thu, Nov 15, 2018 at 2:31 AM Jarek Gawor notifications@github.com wrote:

Fixed in #408 https://github.com/cloudfoundry/ibm-websphere-liberty-buildpack/pull/408

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cloudfoundry/ibm-websphere-liberty-buildpack/issues/407#issuecomment-438768765, or mute the thread https://github.com/notifications/unsubscribe-auth/ASo6M7cQniRY6ZrCtm8g1ft_lNn-H_nwks5uvGGLgaJpZM4Yc53B .

-- 鞠国滨 Bin Ju +86 13662231177