apache / apache/grails-core

container download support does not work with @href (uri)

Open
#14,330 6 comments 0 reactions 0 assignees View on GitHub
relates-to: grails-geb
Dominant language
Groovy
Stars
2.9k
Forks
975
Avg merge
1d 22h
Merged PRs (30d)
92

Description

Even though apache/grails-geb#74 works, I currently have to use this workaround for downloading from a controller-offered download link (@ href) (https://www.gebish.org/manual/current/#downloading-example):

```
// https://github.com/grails/geb/issues/132
static String remove_host_from_uri(href) {
URI uri = new URI(href as String)
String relativePath = uri.getRawPath() + (uri.getRawQuery() ? '?' + uri.getRawQuery() : '')
return relativePath
}
```

Problem: see https://github.com/apache/grails-core/issues/14330

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the controller-offered download link described in the Geb downloading example and compare it with the URI workaround shown in the issue. Trace how the container handles the @href value; done means downloads work directly from that URI without removing the host manually.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy
Domain
web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.