<commit_before>// Copyright 2014 Canonical Ltd.
// Licensed under the LGPLv3, see LICENCE file for details.

// The router package implements an HTTP request router for charm store
// HTTP requests.
package router

import (
	"encoding/json"
	"fmt"
	"net/http"
	"net/url"
	"reflect"
	"sort"
	"strings"

	"github.com/juju/errgo"
	charm "gopkg.in/juju/charm.v3"

	"github.com/juju/charmstore/params"
)

// Implementation note on error handling:
//
// We use errgo.Any only when necessary, so that we can see at a glance
// which are the possible places that could be returning an error with a
// Cause (the only kind of error that can end up setting an HTTP status
// code)

var knownSeries = map[string]bool{
	"bundle":  true,
	"precise": true,
	"quantal": true,
	"raring":  true,<commit_msg>* add support for oneiric<commit_after>// Copyright 2014 Canonical Ltd.
// Licensed under the LGPLv3, see LICENCE file for details.

// The router package implements an HTTP request router for charm store
// HTTP requests.
package router

import (
	"encoding/json"
	"fmt"
	"net/http"
	"net/url"
	"reflect"
	"sort"
	"strings"

	"github.com/juju/errgo"
	charm "gopkg.in/juju/charm.v3"

	"github.com/juju/charmstore/params"
)

// Implementation note on error handling:
//
// We use errgo.Any only when necessary, so that we can see at a glance
// which are the possible places that could be returning an error with a
// Cause (the only kind of error that can end up setting an HTTP status
// code)

var knownSeries = map[string]bool{
	"bundle":  true,
	"oneiric": true,
	"precise": true,
	"quantal": true,
	"raring":  true,
{'fraction_non_alphanumeric': 0.1124223602484472, 'fraction_numerical': 0.007453416149068323, 'mean_word_length': 3.6293103448275863, 'pattern_counts': {'":': 9, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3187727', 'n_tokens_mistral': 564, 'n_tokens_neox': 541, 'n_words': 203}