         return null
     services.join ','
 
-extractStreetAddress = (req) ->
+extractStreetAddress = (req, municipalityParameter) ->
     addressParts = undefined
     addressString = req.query.address or req.query.addresslocation
     if addressString == undefined

        path.push specs.unit
    protocol + path.join('/') + generateQuery(specs, resource, originalUrl) + fragment

redirector = (req, res) ->
    specs = extractSpecification(req)
    url = generateUrl(specs, req.originalUrl)
    res.redirect 301, url
    return

module.exports = redirector


    specs.municipality = extractMunicipality(req)
    specs.services = extractServices(req)
    specs.address = extractStreetAddress(req, specs.municipality)
    if specs.address != null
        specs.serviceCategory = dig('service')
    specs
