Skip to content

Commit

Permalink
Merge pull request #46 from beetlebugorg/bugfix/default-prefix
Browse files Browse the repository at this point in the history
Fix URL construction when using DimsDefaultImagePrefix
  • Loading branch information
JC authored Mar 12, 2022
2 parents 49700ac + f3b26bb commit addd02c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ RUN wget http://download.osgeo.org/libtiff/tiff-${TIFF_VERSION}.tar.gz && \
make -j4 && make install

# Imagemagick
RUN wget https://download.imagemagick.org/ImageMagick/download/releases/ImageMagick-${IMAGEMAGICK_VERSION}.tar.gz && \
RUN wget https://download.imagemagick.org/ImageMagick/download/releases/ImageMagick-${IMAGEMAGICK_VERSION}.tar.xz && \
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig && \
tar xvf ImageMagick-${IMAGEMAGICK_VERSION}.tar.gz && \
tar xvf ImageMagick-${IMAGEMAGICK_VERSION}.tar.xz && \
cd ImageMagick-${IMAGEMAGICK_VERSION} && \
./configure --without-x --with-quantum-depth=8 --prefix=$PREFIX && \
make -j4 && make install
Expand Down
2 changes: 1 addition & 1 deletion src/mod_dims.c
Original file line number Diff line number Diff line change
Expand Up @@ -1348,7 +1348,7 @@ dims_handle_request(dims_request_rec *d)
request_rec *sub_req = ap_sub_req_lookup_uri(d->image_url, d->r, NULL);

if (d->config->default_image_prefix != NULL) {
d->image_url = apr_psprintf(d->r->pool, "%s/%s", d->config->default_image_prefix, d->image_url);
d->image_url = apr_pstrcat(d->r->pool, d->config->default_image_prefix, d->image_url, NULL);
} else if (sub_req && sub_req->canonical_filename) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, d->r, "Looking up image locally: %s", sub_req->canonical_filename);
d->filename = sub_req->canonical_filename;
Expand Down

0 comments on commit addd02c

Please sign in to comment.