Closed kptdobe closed 2 years ago
Interestingly the json
and xml
pipeline uses the parse-mardown
function thus the context.request.extension
should even be false there.
My proposal is to:
process-request
step at the beginning of the pipeline which will deal with
@trieloff WDYT ?
The coerce default values is probably another story.
the context.request.extension
is initialized here:
I think that setting it to html
by default is wrong and the respective pipelines should set it accordingly. or the code that depends on it should be prepared to have it empty.
Yes, that's somehow what I try to say :)
Either you receive the extension as a parameter (do we really sent it in one case ?) or the extension is computed somewhere and the could should be generic for all the pipelines.
Actually, why is this part so complicated ? I think the same applies for the selector
. In the pipeline code, nothing computes the selector thus I assume they are sent as a param or the property is wrong. Maybe it is just about adding the extension
in the dispatch call thus in the pipeline we can assume it is correct. And the code should really cover the empty extension case instead of computing a value for it.
Maybe it is just about adding the extension in the dispatch call thus in the pipeline we can assume it is correct
I think the VCL code used to send those correctly.
ok, then the todo here would become:
extension
in the requestselector
is sent in the request (if not add it)I'll create the corresponding dispatch issue.
won't fix.
Originally posted by @trieloff in https://github.com/adobe/helix-pipeline/pull/473
Related code: https://github.com/adobe/helix-pipeline/blob/master/src/html/parse-markdown.js#L21-L22
parseMarkdown
sets a default request object and a default extension inside this request object. This has nothing to do here and should be done before, most likely at the beginning of the pipeline.